Reputation: 170
I meet confusing issue!
I'm using Vaadin(7) framework to create some (quiet simple) app. When I'm testing it in Eclipse, everything works fine. But when i deploy my project into Tomcat, some mysteries starts...
When I "run" the application from Manager App, there is just the message:
Failed to load the bootstrap javascript: ./VAADIN/vaadinBootstrap.js
But when I type the same address to the browser (Firefox) manually, it works fine again.
I've done a little investigation about that and I found that there are a few people with the same issue but no satisfying solution.
Only thing I found out is that when I use Manager App there is some Cookie, which isn't there when I call it directly.
Cache-Control no-cache
Content-Length 1929
Content-Type text/html
Date Wed, 02 Apr 2014 07:13:40 GMT
Expires Thu, 01 Jan 1970 00:00:00 GMT
Pragma no-cache
Server Apache-Coyote/1.1
Set-Cookie JSESSIONID=F773E7AEDDDE7087CBF46C778CF5353A; Path=/SystematicTool-1.0.1/; HttpOnly
vs.
Cache-Control no-cache
Content-Length 1929
Content-Type text/html
Date Wed, 02 Apr 2014 06:42:28 GMT
Expires Thu, 01 Jan 1970 00:00:00 GMT
Pragma no-cache
Server Apache-Coyote/1.1
Could you please give me a clue how to repair this strange behavior.
Upvotes: 3
Views: 3518
Reputation: 14772
The following hint from the Vaadin Framework Forum helped me:
In your deployment descriptor (web.xml), do you have the VaadinServlet mapped to some other path than "/*"? If you do, you must provide mapping for /VAADIN/* path as well.
Please see section 4.8.3 from here Book of Vaadin (https://vaadin.com/book/-/page/application.environment.html) [...].
Though in the meantime it is:
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = MyProjectUI.class)
public class MyProjectServlet extends VaadinServlet {
}
Upvotes: 1
Reputation: 2803
Try to explicitly enable cookie tracking in your web.xml
:
<session-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
Upvotes: 1