struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Greg Hess" <>
Subject RE: Transactional Control Tokens?
Date Fri, 01 Feb 2002 18:25:13 GMT

Now that I understand the problem, I am trying to understand how the token
is to be used. I have a some questions...

1) Are transactional tokens automatically set by the Action class on submit
or do I call the generateToken()?
2) Does the Action class know when a double submit occurs and then sets the
valid flag to false?
3) To use this token do I just test at the beginning of my Action perform()
for a valid token if it is not valid then do not perform any other business
and record an error and return to the input page?
4) If the token represents an instance of a client request and I have
encountered a invalid token and am returning the client to the input page is
resetToken(request) just house cleaning before the object is destroyed?
Because wouldn't the input page submition generate a new transaction token
for the next request?
5) Is the problem associated with a double submit only that I would execute
the same code twice and for example if I was recording the number of page
requests I would not want to record double submits? or does it have other

Thanks for the help

-----Original Message-----
From: Mister Hundy []
Sent: Friday, February 01, 2002 11:30 AM
Subject: Re: Transactional Control Tokens?

It prevents an erroneous double submit.  If your users use the back button
or click submit twice the isTokenValid() will return false since the token
was reset on the original call.

>In the struts-example application in (,
>the author calls the method saveToken(request) and then isTokenValid() and
>resetToken(). What does this use of transactional control tokens provide?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Join the worldÂ’s largest e-mail service with MSN Hotmail.

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message