• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Caching the Servlet's response  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a application where, if a user click on a link on a JSP, a servlet is invoked. The servlet in turn processes the request parameters and then dispatches request to a JSP. When I click back button on the newly obtained JSP, on the browser, I get the message as :-


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.

To resubmit your information and view this Web page, click the Refresh button.

________

After I refresh the page, I get the previous JSP.
Can anyone suggest a mechanism for auto refreshing the page when I click the back button, through the servlet?
 
Rancher
Posts: 42974
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should not refresh pages that are generated as the result of a POST. See http://faq.javaranch.com/java/DoubleSubmitProblem and the pages it links to for an explanation of the problem, and what you should do to avoid it.
 
amol l a lekurwale
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No Ulf, the page has been generated as a result of GET.
Also, no 'side-effect' causing data is exchanged.
 
Ulf Dittmer
Rancher
Posts: 42974
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd guess that the original page makes use of HTTP header that indicate that the page should not be cached. See http://faq.javaranch.com/java/NoCacheHeaders for details.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!