• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log-out problem

 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp page that has code as mentioned below:

if(session!=null){
session.invalidate();
}

I am able to get out of the login page and able to show a page that mentions the user that the user is logged-out. But when I click on the browser back button the previous page opens. How can I stop this?

Thanks
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pl refer to the following link for the logic I implemented:

http://www.coderanch.com/t/361270/Servlets/java/Sign-Out-Function

Thanks
 
Makarand Parab
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Why don't you use meta data tag no cache, after you logout and when you click the back button what you see is the page that comes fom the cache rather than new request. if you have no cache on, it will request for the same page as if it was a new request, on each page you can check if the session is active else redirect him to the login page.
Try it out and let me know.

Regards
Makarand Parab
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic