You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Siggelkow <bi...@bellsouth.net> on 2004/08/04 02:17:46 UTC

Wildcard action mapping use of **

If you are unfamiliar with wildcard action mappings; they are pretty 
cool. I am writing some documentation on using them; however, I am not 
quite sure of a good use case for the ** feature (where a match included 
the "/"). If anyone can give me a practical scenario using this 
particular feature I would be most appreciated. I prefer not to contrive 
examples :)

Documentation on the wildcard mapping can be found at 
http://struts.apache.org/userGuide/building_controller.html#action_mapping_wildcards

TIA

Bill Siggelkow


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Wildcard action mapping use of **

Posted by Don Brown <do...@gmail.com>.
Heh, I always wondered how you folks would handle those. :)  

To answer the first question, I think "**" would be useful if you were
wanting to support say a really descriptive ReST-style URL (like
"/xml/us/product/category/item") and wanted to leave the parsing of
the URL to the Action class.  So far, I've been able to support more
descriptive URL's by simply doing something like "*/*", but then I
have to figure out how to pass all the matched values to the Action. 
For long/complex URL's, just matching "/xml/**" then letting the
action parse it with regular expressions would be much easier.

Ideally, I'd like to find a way, using wildcards, to get down to zero
configuration needed for 90% of Struts actions, but allow the other
complex 10% to be able to have complete control of the configuration
for their special cases.  I've written up a few ideas here:
http://www.jroller.com/page/mrdon/20040706#zero_configuration_with_struts

Don



On Thu, 05 Aug 2004 10:24:27 +0100, Duncan Mills
<du...@oracle.com> wrote:
> Yup.  And while we're on the subject if anyone has an idea as to how the
> hell we (and other vendors doing Struts Diagramming tools) are supposed
> to represent Wildcard Actions on a Page flow diagram  I'd love to hear :-)
> 
> Regards
> 
> Duncan Mills
> 
> 
> 
> 
> Ruth, Brice wrote:
> 
> > Bill Siggelkow wrote:
> >
> >> If you are unfamiliar with wildcard action mappings; they are pretty
> >> cool. I am writing some documentation on using them; however, I am
> >> not quite sure of a good use case for the ** feature (where a match
> >> included the "/"). If anyone can give me a practical scenario using
> >> this particular feature I would be most appreciated. I prefer not to
> >> contrive examples :)
> >>
> >> Documentation on the wildcard mapping can be found at
> >> http://struts.apache.org/userGuide/building_controller.html#action_mapping_wildcards
> >>
> >>
> >> TIA
> >>
> >> Bill Siggelkow
> >
> >
> > This is a "new for 1.2" feature, correct?
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Wildcard action mapping use of **

Posted by Duncan Mills <du...@oracle.com>.
Yup.  And while we're on the subject if anyone has an idea as to how the 
hell we (and other vendors doing Struts Diagramming tools) are supposed 
to represent Wildcard Actions on a Page flow diagram  I'd love to hear :-)

Regards

Duncan Mills



Ruth, Brice wrote:

> Bill Siggelkow wrote:
>
>> If you are unfamiliar with wildcard action mappings; they are pretty 
>> cool. I am writing some documentation on using them; however, I am 
>> not quite sure of a good use case for the ** feature (where a match 
>> included the "/"). If anyone can give me a practical scenario using 
>> this particular feature I would be most appreciated. I prefer not to 
>> contrive examples :)
>>
>> Documentation on the wildcard mapping can be found at 
>> http://struts.apache.org/userGuide/building_controller.html#action_mapping_wildcards 
>>
>>
>> TIA
>>
>> Bill Siggelkow
>
>
> This is a "new for 1.2" feature, correct?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Wildcard action mapping use of **

Posted by "Ruth, Brice" <br...@fiskars.com>.
Bill Siggelkow wrote:

> If you are unfamiliar with wildcard action mappings; they are pretty 
> cool. I am writing some documentation on using them; however, I am not 
> quite sure of a good use case for the ** feature (where a match 
> included the "/"). If anyone can give me a practical scenario using 
> this particular feature I would be most appreciated. I prefer not to 
> contrive examples :)
>
> Documentation on the wildcard mapping can be found at 
> http://struts.apache.org/userGuide/building_controller.html#action_mapping_wildcards 
>
>
> TIA
>
> Bill Siggelkow

This is a "new for 1.2" feature, correct?

-- 
Brice Ruth, Sr. IT Analyst
Fiskars Brands Inc
http://www.fiskarsbrands.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org