Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
vaadin and spring 3.1.0 NetworkError: 404 Not Found
Hi
We are interested using Vaadin with Spring. I have intergrated it with spring but I keep getting the following error with posting..... Without Spring integration works . Please help me to point what I am doing wrong. I have even debugged vaadin code, and still can't see what is wrong except that the RequestType.BROWSER_DETAILS never comes in to AbstractApplicationServlet
Thanks in advance
Request:
http://localhost:8080/nayriba-ui-vaadin/app
Response from above request:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="chrome=1"/>
<style type="text/css">html, body {height:100%;margin:0;}</style><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/nayriba-ui-vaadin/VAADIN/themes/vaadinsampletheme/favicon.ico" /><link rel="icon" type="image/vnd.microsoft.icon" href="/nayriba-ui-vaadin/VAADIN/themes/vaadinsampletheme/favicon.ico" /><title>Vaadin 7</title>
</head>
<body scroll="auto" class="v-generated-body">
<iframe tabIndex="-1" id="__gwt_historyFrame" style="position:absolute;width:0;height:0;border:0;overflow:hidden;" src="javascript:false"></iframe><script type="text/javascript" src="/nayriba-ui-vaadin/VAADIN/vaadinBootstrap.js"></script>
<script type="text/javascript">
//<![CDATA[
vaadin.setDefaults({"appUri":"/nayriba-ui-vaadin/app","widgetsetBase":"/nayriba-ui-vaadin/VAADIN/widgetsets/","authErrMsg":{"message":"Take note of any unsaved data, and <u>click here<\/u> to continue.","caption":"Authentication problem"},"comErrMsg":{"message":"Take note of any unsaved data, and <u>click here<\/u> to continue.","caption":"Communication problem"},"standalone":true});
vaadin.initApplication("nayribauivaadinapp-864142110",{"themeUri":"/nayriba-ui-vaadin/VAADIN/themes/vaadinsampletheme","versionInfo":{"applicationVersion":"NONVERSIONED","vaadinVersion":"7.0.0.alpha1"},"initPending":true,"rootId":0,"widgetset":"com.vaadin.terminal.gwt.DefaultWidgetSet"});
//]]>
</script>
<div id="nayribauivaadinapp-864142110" class="v-app v-app-Application"null><div class="v-app-loading"></div></div>
<noscript>You have to enable javascript in your browser to use an application built with Vaadin.</noscript></body>
</html>
Error:
"NetworkError: 404 Not Found - http://localhost:8080/nayriba-ui-vaadin/app/?browserDetails&rootId=0&sh=900&sw=1600&cw=1600&ch=362&curdate=1331514990125&tzo=240&dstd=60&rtzo=300&dston=true&wn=nayribauivaadinmyurl-1523238400-0&1331514990125"
web.xml configuration
<!-- Handles Spring requests -->
<servlet>
<servlet-name>nayriba-ui-vaadin</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/spring/dispatcher-servlet.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>nayriba-ui-vaadin</servlet-name>
<!--<url-pattern>/*</url-pattern> -->
<url-pattern>/app/*</url-pattern>
<url-pattern>/mvc/*</url-pattern>
<url-pattern>/myurl/*</url-pattern>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
spring dispatcher-servlet.xml configuration
<!-- Vaadin application controller -->
<bean id="vaadinWrappingController"
class="org.springframework.web.servlet.mvc.ServletWrappingController">
<property name="servletClass"
value="com.vaadin.terminal.gwt.server.ApplicationServlet" />
<property name="initParameters">
<props>
<prop key="root">com.example.vaadinsample.VaadinsampleApplication
</prop>
<prop key="productionMode">true</prop>
<prop key="widgetset">com.vaadin.terminal.gwt.DefaultWidgetSet</prop>
</props>
</property>
</bean>
<!-- Map URIs to web controllers -->
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"
p:alwaysUseFullPath="true">
<property name="urlMap">
<map>
<entry key="/" value-ref="vaadinWrappingController" />
<entry key="/app" value-ref="vaadinWrappingController" />
<entry key="/app/**/*" value-ref="vaadinWrappingController" />
<entry key="/UIDL" value-ref="vaadinWrappingController" />
<entry key="/UIDL/**/*" value-ref="vaadinWrappingController" />
<entry key="/VAADIN/**/*" value-ref="vaadinWrappingController" />
</map>
</property>
</bean>
The following configuration without spring intergration works....
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>com.vaadin.terminal.gwt.server.ApplicationServlet</servlet-class>
<init-param>
<description>Vaadin root</description>
<param-name>root</param-name>
<param-value>com.example.vaadinsample.VaadinsampleApplication</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/myurl/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
I have updated the post, please help with anything. This is my first Vaadin application...and I have already spent two days trying to figure out what the problem is....
Just wondering if the problem has to do with &wn=nayribauivaadinmyurl-1523238400-0&1331514990125"
since the the url is http://localhost:8080/nayriba-ui-vaadin/app and not http://localhost:8080/nayriba-ui-vaadin/myurl
One time my url was
http://localhost:8080/nayriba-ui-vaadin/myurl and I have changed to http://localhost:8080/nayriba-ui-vaadin/app but still the post has &wn=nayribauivaadinmyurl
"NetworkError: 404 Not Found - http://localhost:8080/nayriba-ui-vaadin/app/?browserDetails&rootId=0&sh=900&sw=1600&cw=1600&ch=362&curdate=1331514990125&tzo=240&dstd=60&rtzo=300&dston=true&wn=nayribauivaadinmyurl-1523238400-0&1331514990125"