"Webpage has expired" in Spring Framework MVC

I have a project based in Spring Web model-view-controller (MVC) framework. The version of the Spring Web model-view-controller (MVC) framework is 3.2.8 deployed on a WebLogic Server Version: 12.1.2.0.0

I have this form in 1 JSP

  <form:form commandName="deviceForm" 
                                                name="deviceForm"
                                                id="deviceFormId" 
                                                method="post"
                                                action="${contextPath}/device/${deviceForm.device.id}" 
                                                htmlEscape="yes"
                                                enctype="multipart/form-data">

I make a couple of actions using the method POST.. after this I use the browser (IE11) back button and I got this error

Webpage has expired




Most likely cause:
•The local copy of this webpage is out of date, and the website requires that you download it again.


Something to try:



  Click on the Refresh button on the toolbar to reload the page. After refreshing, you might need to navigate to the specific webpage again, or re-enter information.  



More information  More information   


If you continue to have this problem, try the following: 
1.In Internet Explorer, click the Tools button , click Internet Options, and then click the Advanced tab.
2.Scroll down and clear the “Do not save encrypted pages to disk” option in the Security settings.

I also tried to redirect in the POST method

  response.setStatus(HttpServletResponse.SC_SEE_OTHER   );
        response.setHeader("Location", /device/" + device.id");
        response.setHeader("Connection", "close");
        response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); // HTTP 1.1.
        response.setHeader("Pragma", "no-cache"); // HTTP 1.0.
        response.setHeader("Expires", "0"); // Proxies.
return "redirect:/device/" + device.id"; 

只需设置要获取的方法表单方法,并且当您单击提交按钮时,只需将其更改为发布即可


If you make any POST request browser will always show you "Webpage has Expire". If you refresh the page POST request again submit with all parameters , so Use POST Request only when you have a form to submit or something you can not send in url.

1) Convert all normal request to GET Request and keep only submit request as a POST Request.


Add this tag to your html page:

<meta http-equiv="Cache-control" content="public">

More info here: https://support.microsoft.com/en-us/help/183763/error-message-warning-page-has-expired-the-page-you-requested...

链接地址: http://www.djcxy.com/p/38360.html

上一篇: 在函数内部和外部定义结构的含义?

下一篇: Spring Framework MVC中的“网页已过期”