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 = http://18.104.22.168/app/index.jsp
; // the IP is the same as localhost..
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..