We use a short survey in jQuery to periodically send ajax requests to the server to check if there are any updates on the server. polling works fine, but because of this, the session always remains active. And the session never gets a timeout unless the user manually logs in or closes the browser. This can be achieved by setting a timeout in the survey itself, but we want to process the timeout logic on the server side.
Is there a way to keep the session idle during these ajax calls. Or we need to manually handle the timeout.
We use tomcat as an application server, spring mvc for viewing and controller. I set the session timeout as soon as a new session is created.
session.setMaxInactiveInterval (7200); // 2h
Any help in this regard is appreciated.
Thanks Ekanath
source share