User Tools

Site Tools


vaadin_7_osgi_web_application

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
vaadin_7_osgi_web_application [2014/10/31 14:55]
mihael [Application Code]
vaadin_7_osgi_web_application [2015/04/29 13:37] (current)
mihael
Line 1: Line 1:
 ====== Vaadin 7 OSGi Web Application ====== ====== Vaadin 7 OSGi Web Application ======
  
-  Note: This was tested with the latest ​Vaadin ​release (7.3.3).+<​note>​ 
 +This was tested with Vaadin 7.3.3. ​This guide cannot be used exactly as it is for Vaadin 7.4. See [[vaadin_7.4_osgi_web_application|Vaadin 7.4 OSGi Web Application]] for a using Vaadin 7.4. 
 +</​note>​
  
 [[http://​vaadin.com | Vaadin 7]] is a Servlet based Java web framework. And as most OSGi container support Servlet based web applications very well this should be a match made in heaven. But their are some minor things one will stumble upon when trying to run a Vaadin application inside an OSGi container. One of those things is always the classpath. [[http://​vaadin.com | Vaadin 7]] is a Servlet based Java web framework. And as most OSGi container support Servlet based web applications very well this should be a match made in heaven. But their are some minor things one will stumble upon when trying to run a Vaadin application inside an OSGi container. One of those things is always the classpath.
Line 147: Line 149:
 The file //​vaadinbootstrap.js//​ is located in the //​vaadin-server//​ jar in the folder //VAADIN//. The file should be copied from the vaadin-server jar to the folder ''​src/​main/​webapp/​VAADIN/''​. The file //​vaadinbootstrap.js//​ is located in the //​vaadin-server//​ jar in the folder //VAADIN//. The file should be copied from the vaadin-server jar to the folder ''​src/​main/​webapp/​VAADIN/''​.
  
 +==== Classpath ====
 +Vaadin expects some things to be on the classpath of the application,​ like themes and compiled resources. To get this working in a simple way is to include these in the war (see Embed-Dependency in pom.xml) and add them to the Bundle-ClassPath entry in the manifest file.
 +
 +  Bundle-ClassPath:​ .,​WEB-INF/​classes/,​WEB-INF/​lib/​vaadin-themes-7.3.3.jar,​WEB-INF/​lib/​vaadin-client-compiled-7.3.3.jar
 +  ​
 ===== Building ===== ===== Building =====
 Building the web application bundle with maven is no more than doing a  Building the web application bundle with maven is no more than doing a 
Line 152: Line 159:
   mvn clean package   mvn clean package
  
-The target folder ​should contain ​the bundle (war) file. +The "target" ​folder ​contains ​the bundle (war) file. 
  
 ===== Deployment ===== ===== Deployment =====
Line 201: Line 208:
  
 === Installing Demo === === Installing Demo ===
-Just copy the test.vaadin-x.x.x.war to the deploy folder ​are you are done. The web application is available under the path which is specified in the manifest with the //​Web-ContextPath//,​ in this example ''/​test.vaadin7''​.+Just copy the test.vaadin-x.x.x.war to the deploy folder ​and you are done. The web application is available under the path which is specified in the manifest with the //​Web-ContextPath//,​ in this example ''/​test.vaadin7''​.
  
 So point the browser to ''​http://​localhost:​8181/​test.vaadin7''​. So point the browser to ''​http://​localhost:​8181/​test.vaadin7''​.
vaadin_7_osgi_web_application.1414767348.txt.gz · Last modified: 2014/10/31 14:55 by mihael