*
The moose likes Servlets and the fly likes Login and logout problem with sessions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Login and logout problem with sessions" Watch "Login and logout problem with sessions" New topic
Author

Login and logout problem with sessions

Aditya Vasudeva
Ranch Hand

Joined: May 27, 2008
Posts: 76
I have a login page which takes in a username and password and forwards to a welcome.jsp if login is successful.

Once I logout, I invalidate my session. Unfortunately, if i click the back button, the welcome.jsp page comes back again. This is incorrect.

How do i stop the welcome.jsp from coming back. Instead, another page should load saying that the session has expired.

I went through a few forums in which i learnt that the browser cannot be controlled and that meta-tags have to be used to prevent the browser to cache data. I tried using the following tag to disable caching but it did not work:


Please help. This is very frustrating.
Thank You.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

See this Servlet FAQ entry.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
ou yang
Greenhorn

Joined: Oct 14, 2008
Posts: 10
oh,there are some problems on your code.you would send your coding to the web size so that we can find your errors.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Login and logout problem with sessions
 
Similar Threads
logout issue
issue with logout from struts app
Browser Back Button and Caching
How to disabel the back and forward after session is invalidated
Maintaining sessions