Sometimes, I will add a redirect="true" on pages where I do not want the users to hit the -back button, or hit submit again. I use this and a combination of keeping my data in requests (not session) and even if they fight their way back to a page, the page is empty. That is because the data is not in the request, and I use the struts tags and therefore it shows a blank page. So even if they hit submit, the validator complains and no submit occurs.
Just a thought, Scott -----Original Message----- From: sma3har [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 06, 2005 8:54 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Preventing struts Page Caching I would like to prevent submitting the page twice as well as when back button is pressed user should be taken to login page. Thanks --- Laurie Harper <[EMAIL PROTECTED]> wrote: > sma3har wrote: > > When i submit the page and hit the back button i > can > > submit the page again. The browser is caching the > jsp > > page. I have tried adding this code : > > > > response.setHeader("Cache-Control","no-store"); > > response.setHeader("Pragma","no-cache"); > > response.setDateHeader ("Expires", 0); > > to my jsp page but did not help. > > > > Any solution to this problem? Experts please > help.... > > What problem, exactly? How is page caching related > to resubmitting the > page? Those are separate issues. > > Do you want to prevent the page from being cached, > so that when you hit > the back button the page is re-rendered with fresh > data? Or do you just > want to prevent the same form being submitted twice? > > L. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________ Yahoo! DSL - Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]