Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes Re-login issue after click on browsers back button and press refresh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Re-login issue after click on browsers back button and press refresh" Watch "Re-login issue after click on browsers back button and press refresh" New topic
Author

Re-login issue after click on browsers back button and press refresh

pink yadav
Greenhorn

Joined: May 27, 2008
Posts: 12
Hi All,

I have an application developed in struts1.2. When i click on logout, it get me on login page and make session invalidated.
When i hit browsers back button it shows a message "This page has been expired" on IE. When i refresh that page it get me logged in.
I have used "no-cache" mechanism on each jsp page.

response.setHeader("pragma", "no-cache");
response.setHeader("cache-control", "no-cache");
response.setHeader("cache-control", "must-revalidate");
response.setHeader("cache-control", "no-store");
response.setHeader("expires", "0");

Help me out to resolve this issue...


Thanks & Regards
Pink
Shankar Tanikella
Ranch Hand

Joined: Jan 30, 2011
Posts: 329

Hi there, this problem is discussed here more than couple of times. here & here are the resolved ones. Try out and see if it could help you.
To me personally, trying something at the browser level(possibility that client tweaks the browser) is not the elegant way of solving the issue. May you have a session listener/tracker to redirect the invalid user.


Have Fun with Java
little,little.. little by little makes a lot..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Re-login issue after click on browsers back button and press refresh
 
Similar Threads
JavaScript not working in Mozilla
roblem when caching with Internet Explorer 6.0
Session problem or the browser problem?
Internet Explorer does not automatically resubmit your information for you.
browser is not cached