Hi,

you have to use <s:token/> tag in your form. <s:token/> tag is used to solve
the re-submission use a hidden token in the form. The token is autogenerated
and unique from time to time.
And do following entries in you struts.xml file:
<interceptor-ref name="token" />
<result name="invalid.token">/duplicatformsubmiterror.jsp</result>


On Fri, May 13, 2011 at 4:35 PM, Stefan Magnus Landrø <
stefan.lan...@gmail.com> wrote:

> Have you had a look at the csrf-protection? Not sure if it is request
> or session oriented.
>
> http://nickcoblentz.blogspot.com/2008/11/csrf-prevention-in-struts-2.html
>
> On Thu, May 12, 2011 at 10:42 PM, Rajeev430 <rajeev.ranjan...@gmail.com>
> wrote:
> > Hi,
> >
> > How I can stop duplicate submit in Struts2? Is there any working example
> > code for the reference. I am looking for any pattern (Token Interceptor,
> > Token Session Interceptor, Execute and Wait Interceptor) to solve this
> > problem.
> >
> > Thanks,
> > Rajeev
> >
> >
> > --
> > View this message in context:
> http://struts.1045723.n5.nabble.com/Struts2-duplicate-submit-problem-tp4391457p4391457.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > For additional commands, e-mail: user-h...@struts.apache.org
> >
> >
>
>
>
> --
> BEKK Open
> http://open.bekk.no
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


-- 
Regards,
Jagdeep

Reply via email to