GeeCON Prague 2014*
The moose likes HTML, CSS and JavaScript and the fly likes How to store values when session time out Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to store values when session time out" Watch "How to store values when session time out" New topic
Author

How to store values when session time out

Sharaj Anand
Greenhorn

Joined: Jul 07, 2005
Posts: 22
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


Strength lies not in defence but in attack
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
 
GeeCON Prague 2014
 
subject: How to store values when session time out