File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

How to store values when session time out

Sharaj Anand

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.

Strength lies not in defence but in attack
Ben Souther

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

Joined: Nov 08, 2001
Posts: 15385
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. . I am working on a new version that should be out in a few days too.

I agree. Here's the link:
subject: How to store values when session time out
It's not a secret anymore!