struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <pbened...@apache.org>
Subject Re: Token Session Interceptor and back button
Date Fri, 06 Dec 2013 19:02:57 GMT
You need to have browser caching disabled on your first page:

response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");
// HTTP 1.1
response.setHeader("Pragma", "no-cache"); // HTTP 1.0
response.setDateHeader("Expires", 0); // Proxies



On Fri, Dec 6, 2013 at 5:03 AM, Miguel Almeida <miguel@almeida.at> wrote:

> Paul, I was thinking about this example...what did you have in mind as a
> way to achieve that, tough, i.e., that a browser "back" refreshes the
> page?
>
> I can only see some javascript method/hack for that. Were you thinking
> of something else?
>
>
> Miguel
>
> On Thu, 2013-12-05 at 14:59 -0600, Paul Benedict wrote:
>
> > Make sure your back-button action refreshes the page. You can't reuse a
> > token from the browser's cache. It needs to regenerated.
> >
> >
> > On Thu, Dec 5, 2013 at 12:39 PM, semog12 <semog1epilif@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > I am using the token session interceptor for a form and I have this
> > > situation:
> > > 1) I am in the form page;
> > > 2) I leave the form page;
> > > 3) Go back to the form page by the "back" button;
> > > 4) Submit the form;
> > >
> > > And of course the form is not submitted and the token returns
> > > "invalid.token" but do not adds no actionError. It will not be
> interesting
> > > to add an action error?
> > >
> > > Ok, I can resend to a page with a message but I already have a error
> page
> > > that presents the action errors when necessary.
> > >
> > > Thanks,
> > >
> > > André Gomes
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> http://struts.1045723.n5.nabble.com/Token-Session-Interceptor-and-back-button-tp5714861.html
> > > Sent from the Struts - User mailing list archive at Nabble.com.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
>
>
>


-- 
Cheers,
Paul

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message