struts-user mailing list archives

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

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
implications?

Thanks for the help
Greg


-----Original Message-----
From: Mister Hundy [mailto:mr_hundy@hotmail.com]
Sent: Friday, February 01, 2002 11:30 AM
To: struts-user@jakarta.apache.org
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 (SaveRegistrationAction.java:190,
>:161)
>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:
><mailto:struts-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail:
><mailto:struts-user-help@jakarta.apache.org>
>


_________________________________________________________________
Join the worldÂ’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message