struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Wong <laz...@gmail.com>
Subject Re: Some Idea On REST mapping
Date Tue, 02 Sep 2008 13:22:24 GMT

Thanks Jeromy...

There is not any document about this one.. 
So i missed that feature...



Jeromy Evans - Blue Sky Minds wrote:
> 
> Ryan Wong wrote:
>> I have changed the rest action mapper class to apply Ruby Style .
>> there is draft, post here to find a better way to build RESTful app with
>> struts2
>>
>>   
>  
> I thought the RestActionMapper was already a copy of the RoR 
> convention?  I think it already matches all your mappings except "new" 
> is called "editNew". I'm no expert though.
> 
>> Besides, you could use Parameters and Parameter annotations with Regular
>> Expression to support custom url pattern and Request Parameter Mapping.
>> @Parameters( { @Parameter(pattern = "page/(\\w+)", property = "page") })
>> public class TopicsController(){ }
>>
>> thus,
>>
>>   get http://localhost/namespace/controller/page/1
>>  
>>
>> will call controller's index() method with parameter {page=1} 
>>
>>   
> 
> Sounds interesting. While it makes for a nice URL, some may argue 
> against including params for a resource like this..
> For params before the Controller (in the namespace) you may appreciate 
> the NamedVariablePatternMatcher.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 


-----
Blog: http://www.ryanwong.name
Can Use: English, Chinese
-- 
View this message in context: http://www.nabble.com/Some-Idea-On-REST-mapping-tp19263471p19270183.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message