What vaadin assets do I need for a valid Vaadin application

I have recently downloaded the Vaadin and trying out wrinting a simple application. I am using Tomcat 6.0 Here is what I have so far under $tomcat_home/webapps

$tomcat_home/webapps/myapp/WEB-INF/classes/ <== Contains my application’s class files

When I start off my application, it does show up initial window title and all but after few seconds, I keep getting error message: Failed to load the widgetset: /myapp/VAADIN/widgetsets/com.vaadin…

Do I need anything more? If so, what documentation should l look into?


Maybe I found the answer. I just copied the directory \vaadin-windows-6.0.1\WebContent\VAADIN\ under $tomcat_home/webapps/myapp/ and am no more getting the error. I think I missed this step before - although I don’t recollect this being mentioned anywhere in the book.


I really don’t know much about this, but I maybe have an idea.

Your project doesn’t seem to match a standard Java EE application structure. If you just create a new ‘Dynamic Web Project’ in Eclipse, and do nothing else to it, you’ll get this file/folder structure:


Could it be that it searches for your lib and web.xml from WebContent and not from the root of the project? Try making an WebContent folder and move WEB-INF and META-INF over there.

Your structure is right, you should not have WebConent on deployed application.

Vaadin always fetches resources (javacripts, images, css and other static files) from context-root/VAADIN. You have to either you copy the files as you did or you should make "/" or "/VAADIN/ mapping to web.xml and point them to ApplicationServlet to have Vaadin serve those files through jar-file

WebContent doesn’t belong to servlet specification. It is something that eclipse creates for context-base dir. It serves that directory as web-app base directory. That is good, since you don’t want to add those build and source directories in your WAR’s.

Allright, thanks for the clarification. As I said, I don’t know much about these things :wink:

Yes, Mauno is right. The web.xm is to blame here:

It is actually mentioned in the book also. Take a look at the web.xml samples here:

True, but I wish it was explicitly mentioned in section 4.8.2 - something on the line: if you wish to deploy a vaadin based application in production environment, make sure either a) you have copied /VAADIN directory under your app directory or b) add a mapping as described later in section 4.8.3

Thanks everyone for providing your feedback.