• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

keeping the session alive

 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I want to know is there any way to keep the user session alive although user is idle beyond session timeout interval.
For some reasons i dont want to increase session timeout duration but still i want that user operation becomes succesfull by keeping the session alive in backgroud.

regards,
Ajse
 
Ankit Garg
Sheriff
Posts: 9528
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the solution is simple. Make an AJAX request to the server at regular intervals like 15mins to a do-nothing servlet to keep the session alive.

And if you want the session to remain alive for a particular page like a page where user enters long information, then you can set the session time out on the session object in a servlet or JSP for that particular situation i.e. use the setMaxInactiveInterval method of the HttpSession class...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic