ActionMapping, struts-config and custom attributes

2003-01-05 Thread Steve Vanspall
Hi there,

Me again.

Is there a way to set a custom attribute for an action mapping, then
retrieve that attribute through the ActionMapping class?

I am using Struts 1.1-b2

Regards

Steve Vanspall


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




Re: ActionMapping, struts-config and custom attributes

2003-01-05 Thread David M. Karr
 Steve == Steve Vanspall [EMAIL PROTECTED] writes:

Steve Is there a way to set a custom attribute for an action mapping, then
Steve retrieve that attribute through the ActionMapping class?

Steve I am using Struts 1.1-b2

It appears there's two ways to do this.  You can get a hint about this by
looking at the struts-config_1_1.dtd in the distribution.  I've never tried
either of these, but it's relatively clear how to use them from the DTD.

First is the parameter attribute of the action element.  This just allows
you to set one value, and retrieve it with getParameter() on the
ActionMapping.

Second is to use nested set-property elements in your action element.  This
requires adding additional javabean setters/getters to your Action class.  It's
useful to know that the set-property nested element is available in several
other places in the struts-config.xml file.

I have not checked to see whether either of these features were available in
1.1b2.  I see them in the latest source.

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD




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