You have to use URI templates for the routes, for example:

router.attach("/contact/{id}", ContactServerResource.class);

and in ContactServerResource you do something like this:

String contactID = (String)getRequestAttributes().get("id");

On Mon, Dec 20, 2010 at 1:32 AM,  <[email protected]> wrote:
> How do i reuse the ServerResource to store many resource?
>
> for instance, i have already do:
>
>        router.attach("/contact/123", ContactServerResource.class);
>
>
> How do i type in a different url like /shops/1234 to get to the 
> ContactServerResource's other resource. it seems that one URL is attached to 
> one class only.
>
> is there any example around? how do I do it?
>
> Thank you !
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2691898
>



-- 
Fabián Mandelbaum
IS Engineer

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2692173

Reply via email to