RE: Buillding Vaadin Java into Javascript

The server side code of a Vaadin application requires an application server like Tomcat, and the application path (relative to the context path; often “/*” but can be something else) and everything under it should be handled by the Vaadin application on Tomcat.

What you want to serve statically is the /VAADIN directory. Current versions of Tomcat are quite efficient at serving static resources as long as they come directly from the filesystem rather than from inside JARs, so if performance is an issue, I’d suggest first simply extracting the /VAADIN tree from your build target directory and all the relevant JARs (theme and widgetset JARs and any add-ons that may contain the directory). It should be quite simple to write e.g. an Ant target or a shell script that does that if that is what you want. Remember to make sure the directory is cleaned if necessary when redeploying the application.

If you want to use Apache to serve them, just put the /VAADIN directory on the Apache server and forward other requests to Tomcat.