struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Kriger" <akri...@greaterthanone.com>
Subject RE: a question about transaction tokens
Date Fri, 13 Dec 2002 20:17:30 GMT
When you say 'In action B' call isTokenValid, do mean wrap action B's code
with an if block. And if you do that, what do you do for else (since you
have to return some kind of ActionForward from the execute method. In this
case, I just want to ignore subsequent clicks to submit the form.

-a

-----Original Message-----
From: Brian DeLuca [mailto:bdeluca1@iwon.com]
Sent: Friday, December 13, 2002 10:33
To: struts-user@jakarta.apache.org
Subject: RE: a question about transaction tokens


 To implement is pretty straight forward

Action A  --> generate token route to JSP A

JSP A routes to Action B --> In action B call isTokenValid
   if you want to continue Token validation call saveToken then
   route to JSP C.

JSP C then routes to Action C --> call isTokenValid then call saveToken
route to JSP D

If you want to stop validation at anytime call resetToken.

HTH
b-





 --- On Fri 12/13, Andy Kriger  wrote:From: Andy Kriger [mailto:
akriger@greaterthanone.com]To: struts-user@jakarta.apache.orgDate: Fri, 13
Dec 2002 10:09:27 -0500Subject: a question about transaction tokensI'm
wondering how these are used. They're not mentioned in the O'Reilly bookor
in the docs. After calling generateToken, do I need to wrap my
action'sexecute code in an isTokenValid block to check for an existing
token?For example...execute(...) {     generateToken(request);
if(!isTokenValid(request)) {          // do action stuff     }     else
return ???what???}thxandy--To unsubscribe, e-mail:   For additional
commands, e-mail:

_______________________________________________
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!



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