This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Restrict Multiple Form Submission Using Interceptor in  Struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Restrict Multiple Form Submission Using Interceptor in  Struts 2" Watch "Restrict Multiple Form Submission Using Interceptor in  Struts 2" New topic
Author

Restrict Multiple Form Submission Using Interceptor in Struts 2

sudhir pavan
Ranch Hand

Joined: Sep 01, 2011
Posts: 34
Hi,

I need to restrict the multiple form submission using interceptor concept in struts 2.

Currently i have handle the form submission in client level i.e using java script disable the submission button on first click.

can you provide me the example.

Regards
Sudhir
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

Look at TokenInterceptor or TokenSessionStoreInterceptor


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
sudhir pavan
Ranch Hand

Joined: Sep 01, 2011
Posts: 34
As suggested i have used Token Interceptor to restrict the multiple form submission.
but the thing is i cannot show the error message in intend to show, instead it always shows me below message

"The form has already been processed or no token was supplied, please try again."

any suggestion welcome...
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8935
    
    9

How are you attempting to change the error message?
 
Consider Paul's rocket mass heater.
 
subject: Restrict Multiple Form Submission Using Interceptor in Struts 2