Posted By:
Ted_Husted
Posted On:
Tuesday, August 21, 2001 08:27 AM
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
isTokenValid(request)
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
resetToken(request);
to signal that the token has been used.
-Ted.