struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Taylor" <rtay...@mulework.com>
Subject RE: Using Parameter in Action via the struts-config.xml
Date Wed, 04 Feb 2004 21:18:01 GMT
> .... But how can I get the value specified in the "parameter"
> attribute in my action class.
ActionMapping.getParameter() will get you the value of the parameter
attribute.

> .... Also using "set-property" inside a
> "action" tag does not work?
It works for me. You have to subclass ActionMapping and declare it in your
struts-config file.

<action-mappings type="com.companyname.SubclassedActionMapping">


So when you use set-property, Struts can set those values using reflection.
My guess as to why
its not working is that it silently fails to set those properties because
they don't exist
in the default ActionMapping class.



robert


> -----Original Message-----
> From: Anand Patil [mailto:apatil@syndera.com]
> Sent: Wednesday, February 04, 2004 4:06 PM
> To: struts-user@jakarta.apache.org
> Subject: Using Parameter in Action via the struts-config.xml
>
>
> Hi All,
>   The struts configuration DTD supports having a "parameter" attribute
> to a "action". But how can I get the value specified in the "parameter"
> attribute in my action class. Also using "set-property" inside a
> "action" tag does not work? Anyone have any idea about this?
>
>
> Regards
> Anand Patil
>


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


Mime
View raw message