You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Scrimshire <Ja...@ons.gsi.gov.uk> on 2004/03/24 11:40:41 UTC
Sycnhronizer Token- can someone explain this?Curre
Currently I have an Action that does the following
if (isCancelled(request)) {
log.debug("Request Cancelled");
return mapping.findForward("home");
}
ActionErrors errors = new ActionErrors();
if (!isTokenValid(request)) {
log.debug("Invalid Token " );
errors.add(
ActionErrors.GLOBAL_ERROR,
new ActionError("errors.token"));
}
else
{
log.debug("token success");
}
resetToken(request);
if (!errors.isEmpty()) {
saveErrors(request, errors);
saveToken(request);
return (mapping.getInputForward());
}
// Forward to result page
return mapping.findForward("success");
My problem is the pattern doesn't work unless i save the token in a
previous action using the saveToken(rquest) method..
but what about if I want to go from this action to a page to another
action? this action only saves the token on a resubmit. and reset it if it
is the first occurence. so if i want to do the
action-page-action-page-action how do i go abuot saving the token?? how
should it get saved the first time?
does any one even understand waht i'm saying.. cos i'm not sure i do
anymore
For the latest data on the economy and society
consult National Statistics at http://www.statistics.gov.uk
**********************************************************************
Please Note: Incoming and outgoing email messages
are routinely monitored for compliance with our policy
on the use of electronic communications
**********************************************************************
Legal Disclaimer : Any views expressed by
the sender of this message are not necessarily
those of the Office for National Statistics
**********************************************************************
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org