I've been looking a little bit at the pattern matcher. Allthough I am
not sure that the namespace is the best location to configure this it
easily gets ambiguous with the patterns and it is hard to make the
same convention as for normal struts actions. I noticed the new (?)
Action annotation in the codebehind plugin and I think this would be a
proper place. Any how the */[name]/[value]/* isn't bad either since it
eliminates configuration. Personally I prefer it compact...

I'll try to look into this further when I get the time...

2008/10/25 Ryan Wong <[EMAIL PROTECTED]>:
>
> hello,
>
>
> will u try the new feature NamedVariablePatternMatcher
> http://www.nabble.com/Some-Idea-On-REST-mapping-td19263471.html#a19263471
>
>
> Leonard Broman wrote:
>>
>> Hey!
>>
>> I've been looking around quite some time for a solution how to build a
>> neat REST driven web application. What I basically want to do is
>> something like this:
>>
>> GET /item/user/category/name
>>
>> Should map to ItemController which has the properties user (username,
>> or id per default), category and name. Lets say that username,
>> category and name are coupled, so that there might be items with the
>> same and/or category that differs for different users. So, why not
>> just do /item/id? Well, it looks better.
>> So, I found the question on Don Browns blog
>> http://www.jroller.com/mrdon/entry/struts_2_rest_todos mentioning
>> something about mapping the @Namespace with wildcards and thus getting
>> the url to map cleanly to the dto properties. He also mentions it not
>> being well documented... To put it simple, I've tried doing this and I
>> can't get it to work (I really don't understand the principles so I'm
>> kinda lost). Actually no matter what I put in the Namespace
>> annotation, struts won't find my controller class anymore. Can anybody
>> provide a simple example for this?
>>
>> /Leo
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
> -----
> Blog: http://www.ryanwong.name
> Can Use: English, Chinese
> --
> View this message in context: 
> http://www.nabble.com/RESTful-Crud-clean-url%3As%2C-advanced-howto-anybody--tp20051223p20161106.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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