File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Warning: Page has Expired Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Warning: Page has Expired " Watch "Warning: Page has Expired " New topic

Warning: Page has Expired

aamchi mumbai

Joined: Mar 04, 2005
Posts: 19

I have a report page which show list of item. User can click on item and see detail page.
But now if user click browser back button i am getting warning page saying that
Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.

is there any way to display previous list page? if i change post method to "GET" it is working but i dont want to do that.

Thanks in Advance
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This is one of the consequences of instructing the browser not to cache the page. I expect somewhere in your page you have something similar to the following:

When the user hits the back button, the browser gets the page from it's cache: it doesn't go to the server. One way to avoid this message would be to allow the browser to cache the page, but that might cause other unwanted side effects. Many websites simply accept this message, and hope users will learn not to use the back button. Go to your online banking website, and chances are you'll get this message if you hit the back button. One solution is to use javaScript to disable the back button.

Good luck.

Consultant, Sima Solutions
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
also, check the controller property in your struts-config.xml. if you have the property 'nocache' sets to 'true' for the controller, that will also cause the expired post.

-/a<br />certified slacker...yes, my last name is 'do' - <a href="" target="_blank" rel="nofollow"></a>
aamchi mumbai

Joined: Mar 04, 2005
Posts: 19
Thanks for problem solved
sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
let us know how u solved that with out changing POST to GET and also with out caching ...may be u have found out a way which others wont knwo
arun ramk

Joined: Aug 09, 2008
Posts: 26
but the struts-config.xml controller noncache property is not working.........
is there any global way to do this.......... since i need to modify in 200 jsps............
I agree. Here's the link:
subject: Warning: Page has Expired
It's not a secret anymore!