This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Handling double click on submit Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Handling double click on submit" Watch "Handling double click on submit" New topic

Handling double click on submit

Maurice Maeterlinck

Joined: Aug 28, 2007
Posts: 1
Hi all,

I�ve been working on handling multiple submits with saveToken(request) and isTokenValid(request) , but I have a problem with returning forwards.

I�ve made some artificial action just for testing. These are the actions: : just saves the token

forward = mapping.findForward("success"); : verifies the token and processes the business logic.

if ( isTokenValid(request) ) {
// reset the token

// business logic

return mapping.findForward("success");

} else {
new ActionError("notValidToken"));
saveErrors(request, errors);
return mapping.getInputForward();

notValidToken error displays something like this �action in process, wait-

When user submits the first request isTokenValid(request) returns true then the business logic starts, if user submit the second request before the first action is completed the isTokenValid(request) returns false and the action is forwarded to input page and displays and error. When the first request is totally processed, it returns to a success page, but this doesn�t happen, the browser stays in the input page with the error.

Does anybody know how to forward the first request?

Thanks in advance for any comments.
I agree. Here's the link:
subject: Handling double click on submit