Newbie needs help

Hello everybody!

I’m new in Vaadin and in this forum, but I really like Vaadin and I’m planning to use it in a real project. As I’m starting, I’m having some doubts and problems. Hope I may ask you, I’ve searched before for those topics in the forum but I didn’t find an answer.

1º It seemed to me a strange thing that vaadin brought its own web app server if I can run my apps in a Tomcat. Is it because there’s any difference between its server and others? Should I consider anything when deploying my app folder on a normal Tomcat and not in Vaadin server.

2º To create a vaadin app from scratch (like the demo HelloWorld app I downloaded) I must add: the Vaadin servlets description tags in web.xml, the Vaadin Application classes themselves, the Vaadin jar to lib folder and… anything more? Any js file?

3º When I work with GWT I must precompile my java classes to javascript classes, as far as I’ve read in the tutorial I don’t need to do this. I guess this is because all GWT classes are already precompiled when I download Vaadin, but what about if I create new client/js code? When do I precompile my client code?

4º As Vaadin uses GWT and GWT needs to have a server a and a client folder (for server/java and client/javascript) objects, should I need to have this separation in my project?

I’m not being able to do some things in my test project and I hope after reading your answers, I will. Thank you very much. Bye.


Many of the questions are answered in the
Book of Vaadin
, but to summarize quickly.

Vaadin applications are normally run on a normal Tomcat or similar application server. You can deploy a Vaadin application on Tomcat as a WAR or, if you use Eclipse, use the “Run on Server…” option and then open the application URL in a browser.

The Vaadin distribution includes Jetty to enable running the demos with a minimum of hassle and to get started quickly, but you do not need to use it if you have some other application server installed.

If you are using Eclipse, the
Vaadin plugin
takes care of creating a pre-configured project. Otherwise, see the
documentation section 2.4.2
for a sample project organization and content.

Static resources such as themes (CSS, images etc.) and widgetsets (the compiled client side Javascript code) are included in the JAR under WEB-INF/VAADIN and will be served from it by default. In production environments, it is useful to extract them from the JAR and have them served directly by the web server for better performance.

Vaadin is a server-side framework, and all application logic normally resides on the server.

The included UI components consist of a server-side component and a client-side widget. As long as you do not need to write custom client-side components, the pre-compiled widgetset can be used and your program only interacts with the server side components.

Most Vaadin projects need little or no custom client side code. If custom widgets are necessary, see the
. Vaadin and GWT do not impose constraints on the organization of server-side code, but there are some GWT restrictions on the organization of client side code.

Thank you very much for your reply.

1º My first question was because my app was working in the embeded server and not in Tomcat, but I’ll try to fix somehow now that I know it should work. Before reading your reply it seemed to me very strange to see a server included in a framework. When I used Tomcat the browser told me it couldn’t find gwt javascript files.

2º About my second question, I have Eclipse Galileo and the plugin is very different from what the turorial says. In fact I can’t create a Vaadin Project (and that’s not the only different), but a Dynamic Web Project in wich later I would enable Vaadin, but anyway it leaves the project almost empty: not mention to Vaadin in web.xml, not a single Application sample class, not even the jar. That’s why I had to create some things from scratch.

In fact what I want is to have my project integrated with Google App Engine, I hope I’ll have it soon.

Once again thank you very much and thanks to Vaadin developers, the more I know more I like it. sorry if I ask things that were in the “Book of Vaadin” I really didn’t manage to fix my issues by now.



The current version of the book already talks about the upcoming 1.0 version of the Eclipse plugin. This has not been released yet so there are a couple of differences. See
for a short introduction to the current version of the plugin. You can also use the experimental version of the plugin (should be quite stable) by adding the
update site to your Eclipse. The experimental version is closer to 1.0 than the stable one.

If the browser complains about not finding the widgetset (the javascript files), check your mapping for the VAADIN directory in your web.xml file. If you are serving the widgetset and themes directly from the JAR, you need to add such a mapping if not already there.

chapter 4.8.3

As for Google App Engine, try the latest Vaadin version 6.1.1 and the experimental plugin version from yesterday. These streamline somewhat the process of setting up a GAE project using Vaadin.

See the
Google App Engine HOWTO
. With the latest plugin, you can choose Google App Engine as the deployment configuration and skip steps 1, 3-I, 3-II and 3-V in the HOWTO.

I’ve solved my problem including the VAADIN directory, I was going to tell you when I read your reply.

Now I’m fighting another problem : when I change the code in my app servlet class Eclipse still uses the previous version even after compiling. I don’t know how to solve it by now but I think it’s because of Eclipse and not Vaadin. Anyway I didn’t have much time to work on it so I’ll tell qhen I can take some time and fix it.

Thank you ver much for your replies. Bye