File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes session invalidation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "session invalidation " Watch "session invalidation " New topic

session invalidation

Saman Perera
Ranch Hand

Joined: Jul 15, 2003
Posts: 61
Dear All

some time i get the session invalidation , what is session invalidation

Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
It means that the session object & all the attributes set by the session object created got destroyed.


The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
After logging into the application, if the application is inactive for a specified time then session is considered inactive and session object as well as attributes set in session scope are destroyed.

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
I am a bit concerned that the use of "destroyed" may give the wrong impression. All of the references that were held by the session are removed but the objects are still there. If the session reference was the only one, that object becomes unreachable and eligible for GC, but if there are other references, nothing happens to the object.
If you want something to happen to an object when the session is invalidated, you need to look into HttpSessionBindingListener or one of the other listeners.
I agree. Here's the link:
subject: session invalidation
It's not a secret anymore!