Configuration of web.xml for multiple applications

I want to deploy Vaadin together with other applications in one WAR file.

So I put into my web.xml
instead of

but then got the error message:

Failed to load the widgetset: /TCF/VAADIN/widgetsets/com.vaadin.terminal.gwt.DefaultWidgetSet/com.vaadin.terminal.gwt.DefaultWidgetSet.nocache.js?1269987606793

Is there a way that the Vaadin application can be run like I would?

The other possbility I see is to tell vaadin it should treat some URLs specially like it seems to handle the themes stuff right now. How is this actually done and can it somehow be influenced?

Thanks in advance,

Also add /VAADIN/* mapping to the application (widgetset and themes are loaded from /VAADIN/*

Could you submit the full web.xml file? I have multiple servlets in my application and they work together without any problems

Sorry, I was busy with another task.

Your suggestion worked fine, thanks.


I’m new in vaadin, but now I’m trying to add multiple applications to one vaadin app.
Could you submit yout full web.xml file?

Now I have something like that: and it doesn’t work

DQApplication com.vaadin.terminal.gwt.server.ApplicationServlet application ui.main.DQMainView widgetset dwapplication.DqapplicationWidgetset Application widgetset




DQApplication /VAADIN/* DQ2 /VAADIN/*

You need to map the two applications to different url patterns – the web server needs to know when to call one or the other. See
this example
for several applications.

Thanks for your reply.
I think that you say about two different applications. I think about two different classes in one project which extends Application.
I have one project, where I have one class which is responsible for logging users:

public class


extends Application {


and the second one in other package which is main view of my application:

public class


extends Application implements ActionListener,
ClickListener, ValueChangeListener, ItemClickListener,
TransactionListener {


And I would like to set


as first view of my application. And I’d like to have another URL to


Is it possible? I did what you said and it doesn’t work.


DQApplication com.vaadin.terminal.gwt.server.ApplicationServlet application ui.main.DQMainView DwhApplication com.vaadin.terminal.gwt.server.ApplicationServlet application dwhapplication.DwhApplication DQApplication /d/* DwhApplication /a/* DQApplication /VAADIN/*

I think you said it yourself:

I.e. it is much easier if you approach this as having a single application, and simply switching views.

In a typical scenario, your application would check if the user is logged in, and if not, display a login page with a login form (there is a LoginForm component for that purpose). You would register a LoginForm.LoginListener on your form, so that you get an event on form submission. The event handler would check the username/password and if correct, replace the content of the main window to become the home page for your application.

There are other variations. You could have a single home page and have the login form show as a pop-up; on successful login the listener would register the application user information, hide the login form, and update some components of the page (for example, to enable additional menus, show the user name, etc.)

That’s great idea :slight_smile:
Thanks a lot!