File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with logging out

 
Chintan Shah
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I have used session.invalidate() method for logout procedure...but once i log out..and press back button..instead of issuing a warning..it just gets logged in automatically.
anyone , any ideas, greatly appreciated.
chintan
 
Scott Dunbar
Ranch Hand
Posts: 245
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What app server are you using? I've seen this behavior in older Tomcat versions but not recently.
 
Chintan Shah
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using tomcat 3.3
 
Yogendra Joshi
Ranch Hand
Posts: 213
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Chintahn , Its time for you to upgrade. I've been using Tomcat 5.0.16 which too is not the latest one. But you should try upgrading from 3.3. As older containers might not handle session tracking correctly..

For example , I had an small application which took username from an html page and there was a logout page, Once the user clicks logout and clicks back , And again tries to logout, He gets a value Thankyou for loggingout "NULL".. This time it invalidated the name of the user in session. But for this you also need to use session.removeAttribute("NAME OF YOUR SESSION VARIABLE");

Try this and let me know if it works fine..
 
Chintan Shah
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey..thx
i would try out and let u know.
chintan
 
Chintan Shah
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its not working.
do you have any other idea.
chintan
 
Yogendra Joshi
Ranch Hand
Posts: 213
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chintan ,

First of all you need to post the code so that we can check and provide you with a possible solution. Also One other thing you can do is to expire the page once it is visited.. This is how you can do it..

<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>

Also the error which you are getting please post that too..
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic