I created basic Vaadin app and integrated it to existing project to jetty (there’re several web-apps that are already running on it). I ran at several problems which I solved (as workaround) in a rude way - added some libs, themes etc. And at the end my app started to work.
Here is the list of what I’ve done:
Added libs: vaadin-server, vaadin-shared, json and jsoup → application refused to start without them.
I received error about vaadinBootstrap.js and added it manually to WEB-INF/VAADIN/.
On error about AppWidgetSet or DefaultWidgetSet, I copied widgetsets/com.comodo.AppWidgetSet to WEB-INF/VAADIN
Everything started to work but without theme (reindeer). I took themes/reindeer from vaadin-sources-6.8.2.jar and added to WEB_INF/VAADIN.
As you see, there’re a lot of strange actions I had to do. Points 2-4 were integrated to existing .jar file of another web-app. It is weird, but the problem is with web.xml configuration and it isn’t the question of this topic
The questions are the following:
What base set of vaadin libs should be deployed with web-app?
Where can I take themes in Vaadin 7? If I correctly understood a theme should generate on fly with vaadin-theme and vaadin-theme-compiler. Correct me if I’m wrong.
Is it necessary to add widgetsets (app. 28MB) to WEB-INF/VAADIN, can I start my app without it?
Where do application search for resources like bootstrap, widgetsets or themes during its work? What is its starting point? Near web.xml or does it also look for resources in /web/resources folder (Jetty)?
If you’re not going to be compiling your own widgetset, I believe you must swap vaadin-client-compiler for vaadin-client-compiled.
If you’re using beta10 and Maven (or Ivy), there is a bug in one of the POMs so you may need to add an exclusion of vaadin-shared-deps to vaadin-theme-compiler to get around the missing json error.
That should be all you need to get up and running. I think you could also simplify the list a bit because of transitive dependencies between the components but I have them all explicitly listed.
I also use the exec-maven-plugin to compile my style before packaging. We found that developers were forgetting to compile the final style before committing so we tied it to the package phase:
This won’t work. At least not to access themes and other items. Widgetsets are (if you use Eclipse set up for Vaadin) automatically placed in the VAADIN/widgesets directory for you. If they’re not there, your app will definitely not work.
The correct file structure is:
WEBAPP/
------/WEB-INF
------/lib <where JARs need to be>
------/VAADIN
------/META-INF
------/<any other directories you need>
Without the structure above, you cannot add or change themes. Load images, etc.
FYI images need to be in a theme and images are stored in /VAADIN//images. See
Tutorial for more info on themes and images.
EDIT → It seems you are using Vaadin 7 given the jars list? My comments apply to Vaadin 6.x, not sure about 7.0+