• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to store values when session time out

 
Sharaj Anand
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me that How to store a value when session times out.
For example:-
I doing a online examination but in the middle of the examination session expiers. Then how to store a value and another thing is that when I login again the examination should starts from there with the selected values.
Thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming you mean a servletSession (this is an HTML/Javascript forum).

You could use a session listener to persist the user's data to a database or to a file from the sessionDestroyed method.

You may want to ask that this question be moved to the servlets forum.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I personally avoid this problem by paging my questions. Forces a post back to the server to renew the session.

I wrote an Ajax article on updating session without posting back the page. http://radio.javaranch.com/pascarello/2005/07/05/1120592884938.html . I am working on a new version that should be out in a few days too.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic