When I'm on the JSP2, the url is that of the ActionClass1, so when I hit the reload button, the ActionClass1 is reloaded. (and I would like the ActionClass2 to be reloaded).How can I do ?

Ted Husted

The reload button, by definition, is suppose to resubmit the last request. In this case, you would not like the last request to be resubmitted and reprocessed the same way. You would like ActionClass1 to skip ahead and forward the request to ActionClass2.

A good strategy to tell if a request has already been submitted is to use "tokens". Struts supports this directly with various *token methods in the Action class. To implement this, you would go back to "ActionClass0" that lead to JSP1. In this Action, put

saveToken(request) ;
Then in ActionClass1 put a call to

If the token is not valid, you would want to forward to ActionClass2

If it is valid, you would want to finish the usual processing in ActionClass1 and call

to signal that the token has been used.


0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact