You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kruse, Matt" <MK...@aquent.com> on 2003/04/15 20:06:03 UTC

Multiple set-property tags with the same "property" value?

I'd like to use multiple <set-property> tags within an action and within a
plugin that have the same name. Is this not supported?\

For example, if I have several objects which will be used to display my
page, I would like to define them in my config file, and have the BaseAction
create them, load them, and set the into the request scope for my JSP to
use. So I'd have something like:

<action ...
  <set-property property="useObject" value="MyObject1"/>
  <set-property property="useObject" value="MyObject2"/>
  <set-property property="useObject" value="MyObject3"/>
</action>

Then define "setUserObject()" to store everything in a HashMap or something.
When I do this, only the last property is loaded into my ActionMapping.

Am I doing something wrong, or is this type of thing just not possible?

Matt Kruse