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

Browser back button issue after logout

Ankur Sharma
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am using Struts 1.1(Dyna forms), Tomcat 5.0, JSTL.

lets say user is in some page and it comes through "" (which i see in url bar)
then user logs out I am invalidating the session (let's it goes to then retrieves some info about the user (e.g. user id) and sending user to login page ( setting the userId as querystring).

So i see in url bar http://localhost:8080/myApp/

So far it's good.

Now if user hits browser back button, (since session is invalid) it takes user to error page and in url bar I see http://localhost:8080/myApp/

I don't want to show error page to show. I want to take user back to login page.
How ever when I tried to debug, it does not go to any action and just takes user to error page.

Is there any way I can achieve this?
Any help appreciated.


  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic