@Theme("demo")
@SpringUI
@SuppressWarnings("serial")
@Widgetset("com.journaldev.demoset")
public class MyVaadinUI extends UI {
}
@WebServlet(value = "/testvaadin", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = MyVaadinUI.class)
public static class Servlet extends SpringVaadinServlet {
}
}
<servlet>
<servlet-name>vaadin-spring</servlet-name>
<servlet-class>com.vaadin.server.VaadinServlet</servlet-class>
<init-param>
<description>
Vaadin UI class to use</description>
<param-name>UI</param-name>
<param-value>com.journaldev.spring.Vaadin.MyVaadinUI</param-value>
</init-param>
<async-supported>true</async-supported>
</servlet>
<context-param>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>
<servlet-mapping>
<servlet-name>vaadin-spring</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
Hi,
i am trying to integrate Vaadin into my Spring MVC Project. I have a demo that i was able to successfully integrate into my Project.
My Problem is the following. The entire application is now reachable over every urlpath in the application. That was not the goal for this application. I would actually like to have this application put behind a specific url. I already read the Book of Vaadin and tested out multiple things, but there was some strange behaviour with every change i have made. Changing the servlet mapping in the xml file (e.g.:/testvaadin) makes it that the content loads utterly slow and the content is loaded without any styles and anything. It is just Plain HTML. If i put the servlet mappings into the classfile than he starts telling me that the bootstrap.js file ist not available. Everything else is resulting in either 404 or bootstrap.js not found. I posted the Example Code above without the actual business logic, which i think is not relevant to the problem itself.
Which is the best way to go? XML or Annotation based? Which one does work for you? For me none of them are working properly except for /*
My pom looks like this:
http://pastebin.com/cg7TSir5
Regards,
Akshay