This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes log-out problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "log-out problem" Watch "log-out problem" New topic

log-out problem

Srinivasa Kadiyala
Ranch Hand

Joined: Jun 10, 2004
Posts: 237
I have a jsp page that has code as mentioned below:


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?


Srinivasa Kadiyala
Ranch Hand

Joined: Jun 10, 2004
Posts: 237
Pl refer to the following link for the logic I implemented:

Makarand Parab
Ranch Hand

Joined: Dec 10, 2004
Posts: 121
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.

Makarand Parab
It is sorta covered in the JavaRanch Style Guide.
subject: log-out problem
Similar Threads
how does the servlet knows that the client has closed the browser
Handling session timeout and session invalidate differently
session handling problem
response.sendRedirect("") .. after time interval ..?
Disable "BACK" button..(urgent)