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.
When Should Application.init() Be Getting Called?
I'm new to Vaadin. Using 6.8.0. Deploying to Tomcat 7 via Eclipse WTP running in debug mode with Tomcat default settings. I'm noticing that from IE 9 and Chrome 19 (is that the version???) on Windows 7, when I load my application's main page, everything is fine. But, if I reload the page in either browser, the init() method gets called again. It was my understanding that that method should only be called when the Application is first being initialized and that on all subsequent calls back to the server, the Application instance should be pulled from session and restored and thus, init() shouldn't be called again. More importantly though, whether init() is called again or not, my Application instance variables are cleared out (I assume because in fact, the Application instance is a new one rather than from session). Can someone explain what's going on? How is it supposed to work? Do I need to reconfigure something?
Thanks
Any insight on this? I have come across the same behavior. My case is more similar to this post where the user is being forced to go back through the login process when they hit F5. Any help would be appreciated.
-Matt
This sounds like this problem which is caused by Tomcat 7 being picky with cookie paths. Please ensure that you have a slash at the end of your URL (e.g. http://myhost.com/foo/) or that sessionCookiePathUsesTrailingSlash is disabled in Tomcat's context settings.
Thanks, that did the trick. On a related note... is there a way to capture this request and refresh parts of the application?
-Matt
Matt Mathiason: Thanks, that did the trick. On a related note... is there a way to capture this request and refresh parts of the application?
-Matt
Please check these changes to see how we detect and circumvent the issue in Vaadin 7.