After a lot of browsing javadocs and scratching my head in confusion,
I have something that appears to be working.

In struts-config.xml I have a few <set-property ...> elements for an
action. For the action mapping element of that action I have
className="my mapping class".

I have created a class that extends ActionMapping that provides get
and set methods for these properties.

These are then accessible inside the action by casting the provided
action to the right class.

Now that I have spent 2 hours looking at javadocs, I understand what
is going on (I hope!) but this could REALLY do with an entry in the
descriptive documentation. The javadocs only provide subtle hints
about what is going on with that particular class and nothing ties any
of it together.

Have I missed something? Do I need to do anything else?

Chris

On 2/20/06, Laurie Harper <[EMAIL PROTECTED]> wrote:
> Chris Cheshire wrote:
> > If I am reading the docs right, the "parameter" attribute of the
> > action element only allows you to define 1 generic parameter for the
> > action.
> >
> > I need to be able to specify a few different parameters and their
> > values. Prior to converting to struts I would put these as init-params
> > in web.xml under each servlet declaration.
> >
> > Is there a way to do this in the struts config without using global
> > context params in web.xml?
> >
> > Thanks
> >
> > Chris
>
> Is the <set-property> element what you're looking for?
>
>    <action ...>
>      <set-property property="myProperty" value="..."/>
>    </action>
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to