But my problem is: The previous page is generated with parameters and attributes, then i need to use that parameters and attributes to generate the same page again.
When i try to go back from my error page, and i get the "expire message", i try to reload the page, a alert message is asking me if i want to resend the information to generate the page again, how can i do this automatically? There is some way to know what page (or action) called my error page to reload that page (or action)?
Your page is generated in response to POST request, and has an expiration header with little or no valid time.
1. My belief, shared by many others, is that it is not proper to reply with a meaningful page in response to POST request. Instead, you may want to receive POST request, process input data, store it somewhere on the server and redirect to a result page. In this case the result page will be loaded with GET request. If you store the data on the server, your result page will not have input parameters besides page ID or object ID.
2. GET requests can be resent automatically, but when a POST request is resent, browser asks a user to confirm operation, this is what you see. So, if you use the redirect to your result page, you will be able to reload it without alert message, because redirect uses GET.
3. As a workaround you may want to submit your form using GET instead of POST, see the type
attribute in the form
tag. In this case the form would be resubmitted automatically without messages, but you have to process double submit issues on the server.
4. If you can control HTTP response header for this individual page, you may just set expiration time in the future, so the page would not be reloaded at all, but would be pulled from the cache.