Hi,
I have been using
SpringVaadinIntegration
with satisfaction. Now that an
official spring addon
is released, I’d like to migrate.
I followed the guide and everything works fine, except when I try to open a new BrowserWindow with the same UI, I get:
HTTP Status 404 - Request was not handled by any registered handler
BrowserWindow Request was not handled by any registered handler
my UI class:
[code]
@Component
@Theme(“mytheme”)
@SpringUI
public class MyUI extends UI
{
private static final long serialVersionUID = 1L;
@WebServlet(urlPatterns = {"/app/*", "/VAADIN/*"}, asyncSupported = true)
public static class Servlet extends SpringVaadinServlet {
private static final long serialVersionUID = 1L;
}
@WebListener
public static class MyContextLoaderListener extends ContextLoaderListener {
}
@Configuration
@EnableVaadin
public static class MyConfiguration {
}
public MyUI() {
super();
}
@Override
protected void init(VaadinRequest request) {
VerticalLayout mainContent = getMainContent();
setContent(mainContent);
}
[/code]my web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>Test</display-name>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
<context-param>
<description>Vaadin production mode</description>
<param-name>productionMode</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
/WEB-INF/applicationContext-security.xml
/WEB-INF/applicationContext-cache.xml
</param-value>
</context-param>
<filter>
<filter-name>deviceResolverRequestFilter</filter-name>
<filter-class>org.springframework.mobile.device.DeviceResolverRequestFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>deviceResolverRequestFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<servlet>
<servlet-name>Test Application</servlet-name>
<init-param>
<param-name>widgetset</param-name>
<param-value>com.mydomain.AppWidgetSet</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>mobile</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>mobile</servlet-name>
<url-pattern>/mobile/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
Button that opens new browser window
Button myButton = new Button("push me");
myButton.addMyClickListener(this);
myButton.setData(Buttons.OPEN);
BrowserWindowOpener opener = new BrowserWindowOpener(MyUI.class);
opener.extend(myButton);
hl.addComponent(myButton);
In the console log I can’t see any error.
Spring release is 4.1.7
Spring security release is 4.0.1
Vaadin release is 7.5.2
Can anyone help me?
Thank you, Francesco