Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

page has expired

  Asked By: Lourdes    Date: Jun 08    Category: Java    Views: 1101
  

there are two pages (for example pageA & pageB)for submiting a
request . in first page(pageA), necessary files can be attached to the
request . after filling pageA , pageB appears . In pageB ,the request
is completed and submitted to the server . to do this , I have used
post method in pageB and enctype="multipart/form-data" .
but I have a problem : in pageB when I click on "back" button in IE ,
an exception appears "page has expired".
To solve this problem , I used
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
in jsp page but he problem has not been corrected yet . please tell me
what can I do.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Michele Grant     Answered On: Jun 08

I think the code you used as written below causes the problem. This code is used when you want nothing to be cached in a JSP page  response. Try the following solutions and I hope it works:

- Remove the code that you mentioned below and test your application again.

- It may be your IE’s setting that prevents anything to be cached on client side, check it.

- If none of above worked, use a JavaScript trick on client side to go back  and refresh when you click  on BACK button.

 
Answer #2    Answered By: Aberto Rossi     Answered On: Jun 08

You can use the following solution :
put your form data to session scope instead of request , and when your upload is complete
remove them from session.

 
Didn't find what you were looking for? Find more on page has expired Or get search suggestion and latest updates.




Tagged: