How to protect submitting a same request twice?

9 views
Skip to first unread message

Rajnish

unread,
Jul 2, 2009, 12:21:22 PM7/2/09
to Technical Discussion
What are the best techniques to protect a user from hitting submit
button of the form twice. Ensure that we should not use JAVASCRIPT.

Sandeep Kadyan

unread,
Jul 2, 2009, 12:57:05 PM7/2/09
to technical-...@googlegroups.com
Hi
I am also searching the best technique for this. I found in strut2 docs that there is in-built support for handling this situation using TokenIntercepter. I did not get the complete technique used in this mechanism. Does anybody knows other technique?



Sandeep Kadyan
e-M@il:sandeep...@gmail.com
Skype IM: sandeep.kadyan
YIM: theka...@yahoo.com
Cell:-+91 99116 14500

subhi

unread,
Jul 6, 2009, 8:13:56 AM7/6/09
to Technical Discussion
Hi Friends,
I haven't any idea about struts but see below link if it can help out
you.

http://struts.apache.org/2.1.2/docs/token-interceptor.html

Subhash.

On Jul 2, 9:57 pm, Sandeep Kadyan <sandeep.kad...@gmail.com> wrote:
> Hi
> I am also searching the best technique for this. I found in strut2 docs that
> there is in-built support for handling this situation using
> TokenIntercepter. I did not get the complete technique used in this
> mechanism. Does anybody knows other technique?
>
> Sandeep Kadyan
> e-M@il:sandeep.kad...@gmail.com
> Skype IM: sandeep.kadyan
> YIM: thekadi...@yahoo.com
> Cell:-+91 99116 14500
>
>
>
> On Thu, Jul 2, 2009 at 9:51 PM, Rajnish <rajnis...@gmail.com> wrote:
>
> > What are the best techniques to protect a user from hitting submit
> > button of the form twice. Ensure that we should not use JAVASCRIPT.- Hide quoted text -
>
> - Show quoted text -

Rajnish

unread,
Jul 14, 2009, 10:54:16 AM7/14/09
to Technical Discussion
I do not much idea, but one approach I have seen is
Passing some <Token> with the response. The submit button will pass
the same <Token>. This Token will be checked by the TokenManager. New
page will have different Token value. Submitting again will have same
Token vale and we can identify that it is same request submitted
twice.

One thing we have to take care of is that the Operation of checking
the Token value should be atomic, otherwise both requests could have
impact and can be processed.
> > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages