Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Session Behavior on Browser close

843835May 30 2003 — edited Oct 17 2003
Hi,

My application sets the username in the session as an attribute once the user had successfully logged in. On explicit logout ...a button which calls a logout servlet that re-sets the session("username","") .. attribute like this. This destroys the session and the user has successfully logged out.

HOWEVER my problem is .... when I close the browser, the session persists and the user is not logged out !

What am I doing wrong ? or is this the behaviour of a session? I dont want to set a maxInactiveInterval for timeout. I want the user's session to be killed once the browser is closed.

The session is set in my login page itself which is a JSP.

Thanks,
Regards,
Abhijeet

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2003
Added on May 30 2003
19 comments
828 views