Try to utilize the parameter in your action mapping.

For loading action, parameter = "load"; for submission action, parameter =
"submit".

Base action class logic:

If parameter is "load"
        saveToken(request)
If parameter is "submit"
        isTokenValid(request)
        submit
        resetToken(request)


Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: Jerome Jacobsen [mailto:[EMAIL PROTECTED]] 
Sent: January 30, 2003 12:28 PM
To: Struts Users Mailing List
Subject: RE: tokens and set-property

The <set-property> applies to the ActionMapping, not the Action.  You can
subclass ActionMapping and add a "useToken" property to it.  Then the
<action> entity will need the "className" attribute set to your
ActionMapping subclass.

<action className="com.blah.MyActionMapping" path="blah"...>
 <set-property property="useToken" value="true"/>
</action>


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 30, 2003 12:19 PM
> To: [EMAIL PROTECTED]
> Subject: tokens and set-property
>
>
> I'd like to use the set-property element of struts-config to tell
> my action
> whether to expect a token.  For example, I have an action like this:
>
> <action path="blah"...>
> <set-property property="useToken" value="true"/>
> </action>
>
> I'm using an abstract action subclass that itself is a superclass to my
> "real" actions.  It contains a boolean useToken property.  I also tries a
> String but it didn't matter.  That property never gets set to
> what I specify
> in the struts-config file.  Any suggestions?
>
> thanks
>
> john
>
> john gregg
> Wells Fargo Services Company
> Minneapolis, MN
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to