Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to disabel the back and forward after session is invalidated

 
Bhavik Patel
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiiii...I have one logout.jsp page which logouts a user from a registration system application.I have used beans in session scope .....my main welcome page is just menus with greeting the user....whenever user clicks logout button i have put session.invalidate() in the logout.jsp.....but from the response of logout.jsp if user uses browser navigator(BACK,Forward)it will take the user again inside the welcome .jsp page which comes whenever user logs in....


login.jsp--->welcome.jsp(with diff menus and greeting to user,one of them logout)-->logout.jsp-->responseLogout.jsp(successfully logged out .....click here to login again)

if user clicks back after responseLogout.jsp it takes the user to welcome.jsp.....it should invalidate the session...Thanks in Advance....
[ April 23, 2005: Message edited by: Bear Bibeault ]
 
chowdary Thammineedi
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Bhavik

There is a nice article on this topic, here.
http://www.javaworld.com/javaworld/jw-09-2004/jw-0927-logout.html
 
Bhavik Patel
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks i will follow the link...i guesss that will work .....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic