jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes Session Management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session Management" Watch "Session Management" New topic

Session Management

S Chandra Mohan
Ranch Hand

Joined: Oct 19, 2000
Posts: 75
Dear Friends,
Iam using sessions to keep track with user id and passwords.
But when i close the prevoious user and entry and open new user
, in the same browser, then content relating to previous user is getting displayed.
This is giving high problem to me.
Is there any solution that i can remove all the traces of previous session before going for a new session.
Thanks in advance
S Chandra Mohan

Have a wonderful day and wish u success<p>S Chandra Mohan<br />sc_mohan_us@yahoo.com
Yoo-Jin Lee
Ranch Hand

Joined: Nov 01, 2000
Posts: 119
I can't tell exactly what's wrong since you didn't post any code but it sounds like your not invalidating your session correctly.
HttpSession session = req.getSession(false);
if(session != null){
This will get any current session and if there is one then it will invalidate it.

Joined: Jan 05, 2001
Posts: 3
You should search the Tomcat-Users mailing list archive at http://jakarta.apache.org..I've seen this question before with several different potential solutions, including the one posted previously. Another method is to not use cookies, but instead use URL-rewriting...and the login page should neither check for nor use a JSessionID in the URL.
I agree. Here's the link: http://aspose.com/file-tools
subject: Session Management
It's not a secret anymore!