Laurie Harper wrote:

There's a couple of ways to do this better ;-) Firstly, you can reference the URL pattern matches ({1} etc) in the 'parameter' attribute of the action mapping, so you can pass stuff along that way.

Yeah, I didn't want to parse the parameter, plus I'm already using it. Putting properties-like into the parameter seems gimpy.

Not like re-parsing the URL... :D

More usefully, you can use the <attribute> element within your action mapping to do the same thing (this requires a post-1.2.7 build so if you don't want to use a nightly build you'll need to wait for the upcoming 1.3 to use this).

Yeah, I was locked into the Struts version so I couldn't do that either... *sigh*

    <attribute name="param1" value="{1}"/>
    <attribute name="param2" value="{2}"/>

Then your action has setParam1(String), etc. methods and you can avoid re-parsing the URL.

That's so much nicer. Thanks for teasing me with something I can't use! ;)

Dave



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

Reply via email to