I created a Vaadin application in Eclipse using the project wizard. That is, via File → New → … → Vaadin project. It generated a web.xml with code like this:
<servlet-mapping>
<servlet-name>Foo Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
My application needs to use other servlets and static content. I don’t want everything routed through com.vaadin.terminal.gwt.server.ApplicationServlet. But the wildcard URL pattern says everything will go to the “Foo Application” servlet.
Is there a way to configure web.xml more narrowly? I tried doing this:
<servlet>
<servlet-name>Foo Application</servlet-name>
<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
<init-param>
<description>
Vaadin application class to start</description>
<param-name>application</param-name>
<param-value>com.example.foo.FooApplication</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Foo Application</servlet-name>
<url-pattern>/Go</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Foo Application</servlet-name>
<url-pattern>/VAADIN</url-pattern>
</servlet-mapping>
My application will need to be invoked as http://localhost:8080/Foo/Go instead of just http://localhost:8080/Foo but that is fine.