File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session Management" Watch "Session Management" New topic
Author

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
Regards
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
Hi,
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.
Try:
HttpSession session = req.getSession(false);
if(session != null){
session.invalidate();
}
This will get any current session and if there is one then it will invalidate it.
cheers,
Yoo-Jin.
Diskmuncher
Greenhorn

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
 
Similar Threads
Session Timeout Handling through java script
how to check whether the session is valid or not?
Combine two struts applications.
How to set JSESSIONID's maxAge?
session validate is not working in internet explorer only, but working with other browsers