VAADIN themes fixed local?

Hi folks,
must the VAADIN folder be on the local machine where the application runs on. Or is it possible to store this folder somewhere on a server and the application can access this server. Because we have to use load balancing and want all servers to be synchronized that means that on every server the current themes are stored.



VAADIN-folder contents can be served by the servlet container directly - in this case the folder must be stored in the web application directory (or WAR-file if you are serving directly from there). Furthermore, theme (or parts of it) can be server by the application servlet from vaadin.jar (this is where base themes normally reside).

In case you would like to do some load balancing by serving these static resources from another server or maybe even from a globally distributed set of “local cache servers” (Amazon CloudFront, …), you must customize the index.html that starts the application. This is normally generated by the application servlet, but you can also copy the generated page (or create it from scratch using multiapp.html as an example) to a static resource or create it dynamically.

Hi Joonas
thank you for fast response. Can you ellaborate your solution. It’s not clear to me where this index.html resides and where to put my information for the themes.

thank you


Hello Aleksandar

First, I don’t know anything about Joonas solution. But here is scenario what I have with my current project.

I am serving these “static” files by Apache 2.2.x. Apache is working as a load balancer. My application server is Weblogic. A short story is that I have configured my Vaadin application to /app/* url in web.xml and configured to Apache that only /myapplication/app is forwarded to Weblogic and /myapplication/VAADIN is served from local Apache directory. Hope this helps. By the way what application server you are using? You can also use Apache as a load balancer with Tomcat.


Hi Petri
hmm nice solution. i will give it a try.
We are using Apache Tomcat 5.5 . Can i make it the same way with tomcat as with weblogic? Or do i have to pay attention on something?


It’s pretty much same. Take a look at
balancer howto
. At least mod_proxy is quite easy to configure.

Thank you Petri.
Joonas i have a question. Do you mean the index.jsp or the index.html? Because i can’t find this index.html or do i have to create it by myself?


Aleksandar, I think the HTML is generated by the application. You can view the source of an application and copy that, or you can use the
multiple applications example
as a starting point.

Hi its me again.
I do understand the solution but i am confused. Because i don’t really know where to put all the things together for example this multiapp.html.
I can seperate every uri and match the necessary theme content to the uri. But how do i use this thing. I am not so in html. please explain a little bit more if you can.

Thank you very much

Hello Petri!
I would like to implement the same solution you mentioned.
Could you please provide your apache configurations, cause mine are not work the way they should :frowning:

I found all i needed
may be someone will find it useful.