Hi,

you add the attribute className in the xml (struts-config.xml)
with your own class derived from ActionMapping, say
com.tecmath.cms.mt.struts.Mapping
which implements the method
  public void setTest(String param)
  {
    //usually ...
    this.test = param;
  }

and you can use test as you wish.

Here the snippet for the struts-config.xml

<action path="/admin/account/create" parameter="create" 
 className="com.tecmath.cms.mt.struts.Mapping"
 validate="true"
 unknown="false" scope="session"
 type="com.tecmath.cms.mt.struts.UserDataAction" name="userDataBean">
        <set-property property="test" value="test" />
        <forward name="failure" path="accountDef" redirect="false" />
        <forward name="success" path="/user/account/show.do"
redirect="false" />
 </action>


Ronaldo

> -----Ursprüngliche Nachricht-----
> Von: Dirk Storck [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 29. Januar 2002 10:41
> An: Struts User (E-Mail)
> Betreff: struts-action reading property set in config
> 
> 
> Hi I have the following action defined:
> 
> <action path="/admin/account/create" parameter="create" 
> validate="true"
> unknown="false" scope="session"
> type="com.tecmath.cms.mt.struts.UserDataAction" name="userDataBean">
>       <set-property property="test" value="test" />
>       <forward name="failure" path="accountDef" redirect="false" />
>       <forward name="success" path="/user/account/show.do" 
> redirect="false" />
> </action>
> 
> How Can I now read that property "test" within my Action?
> 
> Thanks !
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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

Reply via email to