Forums Register Login

Session Management

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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.
What a show! What atmosphere! What fun! What a tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 687 times.
Similar Threads
how to check whether the session is valid or not?
How to set JSESSIONID's maxAge?
Combine two struts applications.
session validate is not working in internet explorer
Session Timeout Handling through java script
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:17:27.