troubleshooting Question

sessions problem

Avatar of sandsgaucho
sandsgaucho asked on
6 Comments1 Solution170 ViewsLast Modified:

I have a main page where I am creating a session and set my attributes such as username, profile etc..

I navigate to a page B on my menu and in this page B, I have back button as follows:

String url =; // the IP is the same as localhost..

<input type="button" name="gobck" value="goBack"  onclick="Javascript:window.location.href='<%=url%>>  

which basically takes the user back to the main page..

I have a weird problem with the above..

My problem is that once the user gets to the index.jsp, he has been logged out automatically !! i.e. the session is lost..  BUTthis doesnt happen always !! Sometimes the user is still logged in and at other times, he has been logged out !!

WHy is this happening ?

I replaced the URL string with just "index.jsp" but this is causing other weird problems such as the displaying the name of another user who had logged in earlier !!!

For logging out, I call session.invalidate().

appreciate some suggestions..


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros