I like it.
Perhaps you should create an enhancement request in bugzilla and attach a
patch with your code.
Niall
----- Original Message -----
From: "Don Brown" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 30, 2003 11:18 PM
Subject: [PROPOSAL] Wildcard-matched actions
> Perhaps now that 1.1 is final, this would be a good time to bring this up.
> I've written a small extension to Struts that allows action mappings to
> use wildcards in matching URIs. The matched values can then be
> substituted anywhere in the action mapping - similar to how Cocoon
> operates (in fact the wildcard code was copied from Cocoon). The code
> only affects the processActionMapping method of the RequestProcessor.
>
> Why you ask?
>
> - Much smaller config files
> - Use of wildcards encourages more consistency of naming action forms,
> actions, and jsp files.
> - Allows for noun-based URLs in addition to current verb-based URLS,
> particularly useful in REST-style web services
> - No performance loss: wildcard matching only occurs when a direct
> mapping for the URI cannot be found
>
> For example:
>
> <!-- Matches all edit forms -->
> <action path="/edit*"
> type="org.apache.struts.webapp.example.Edit{1}Action"
> attribute="{1}Form"
> scope="request"
> validate="false">
> <forward name="failure" path="/mainMenu.jsp"/>
> <forward name="success" path="/{1}.jsp"/>
> </action>
>
> By including this feature directly in Struts, wildcards would be available
> to all Struts applications as opposed to now where wildcard support
> requires a RequestProcessor extension.
>
> For more information:
>
> http://www.twdata.org/struts-wildcard/
>
> Don
>
>
> ---------------------------------------------------------------------
> 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]