struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Sutton <>
Subject Re: REST plugin URL syntax
Date Mon, 16 Jun 2008 20:11:36 GMT
It's true that it takes a bit of reading between the lines, but 
basically REST relies on unique identifiers for resources, which for 
HTTP is commonly taken to mean a URLs of the form;


(to confirm this have a spin through the google results showing various 

With servers with many apps on this is commonly expanded to;


In the strictest send the Mikes URLs should be;

because we are uniquely identifying a chapter and to do this we need to 
include the book id, but for the sake of clarity (which was the reason I 
beleive he was using x/x_id/y/y_id notation I expanded the noun to show 
book and chapter.


Laurie Harper wrote:
> It may be the case that the REST plugin can't support this (I don't 
> know if that's true) but I don't see anything in the cited reference 
> that says such URLs are un-RESTful. And a Struts apps should certainly 
> be able to support them, even if it requires writing a little more 
> code (e.g. a custom action mapper?)
> L.
> Al Sutton wrote:
>> Mike,
>> Rest URLs doesn't work that way, so the plugin is correct and your 
>> needs are not in sync with REST standards (see 
>> for a 
>> more details on REST).
>> If you want to do something with multiple IDs my suggestion would be 
>> URLs along the lines of;
>> Al.
>> Mike Watson wrote:
>>> Hi Folks,
>>> I'm trying to use the REST plugin to implement a service that serves
>>> resources using the following url syntax:
>>>   (which works fine)
>>>   (which throws a 500
>>> because my book controller doesn't have a chapter() method)
>>>   (which returns 404)
>>> I'd expect the two chapter urls to access the ChapterController
>>> instead of the BookController.
>>> Being able to request resources 'within resources' like this is
>>> crucial to my application. Can anybody tell me how I can configure the
>>> rest plugin to behave like this, or point me at some documentation
>>> that does?
>>> Thanks in advance,
>>> Mike
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message