Sounds like you want...

<action path="/page/tile1" parameter="tile1" ... />
<action path="/page/tile2" parameter="tile2" ... />

You can access the value of "parameter" with "mapping.getParameter()"

If you want more per-mapping configuration, you can write a custom subclass of ActionMapping and set its properties with <set-property property="foo" value="bar" /> elements nested inside the "action" class. (Declare the ActionMapping subclass with the "className" attribute of <action>.

Someone was tossing around an idea (and maybe even some code) to use for mapping Actions using regular expressions over on struts-dev about two months ago -- it seemed pretty cool to me, but I haven't noticed any committers moving to integrate it, so you'd have to deal with patching the CVS tree and building your own Struts distribution...

Joe


At 15:52 -0500 9/18/03, Matt Raible wrote:
I want to hit a "page" action (path="/page") with the following URLs - and
then do logic to determine which tiles definition I should load:

http://site.com/do/page/tile1
http://site.com/do/page/tile2

But I keep getting:

RequestProcessor.processMapping(683) | Invalid path /page/tile1 was
requested.  Is this possible w/o subclassing RequestProcessor.  Can I do
path="/page/*" (I tried this, no dice) in my struts-config.xml?

I know I can use the "DefinitionDispatcherAction" to do
/do/page?def=defName, but I'd like a cleaner URL (no params).

Thanks,

Matt

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


--
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "If nature worked that way, the universe would crash all the time." --Jaron Lanier


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



Reply via email to