We’re using Vaadin application, and while in use, Vaadin eventually shows errors “Session expired”, but in Glassfish, which hosts this app, session timeout is set to 8 hours (much more than period of time between the last access and getting ‘session expired’). After debugging the app, we dug out this thing: while loading page, Vaadin requests session using request.getSession(true), for subsequent ajax requests it uses request.getSession(false); and eventually request.getSession(false) returns null, so session expired message appears. It seems that web container ignores session-timeout setting.
We’re using Vaadin application, and while in use, Vaadin eventually shows errors Session expired,
Share
The default session timeout in Glassfish is 30 minutes. If this matches your experience, the timeout setting of 8 hours (28800 seconds) is somehow ignored completely.
You can specify the timeout in glassfish-web.xml:
glassfish-web-app > session-config > session-properties > timeoutSeconds
Or you can have a session-timeout element is specified in the web.xml file. This overrides the timeoutSeconds value.