Default router mode is Router.MODE_FIRST_MATCH, so just move your avatar resource first.
You're ruling out having a file_id of "avatar", but presumably you're OK with that. --tim On Fri, Jun 8, 2012 at 2:49 PM, Rodrigo Duarte Sousa < rodrigodso...@gmail.com> wrote: > Hi, > > I'm trying to implement two distinct resources, one should response at URL > /media/{user_id}/{file_id} the other one should response at URL > /media/{user_id}/avatar. > > Here is the createInboundRoot code: > > public synchronized Restlet createInboundRoot() { > Router router = new Router(getContext()); > > router.attach("/media/{user_id}/{file_id}", > MediaResource.class); > > // POST /media/<n...@domain.com> > router.attach("/media/{user_id}", MediasResource.class); > > // GET/PUT/POST/DELETE /media/<n...@domain.com>/avatar > router.attach("/media/{user_id}/avatar", > AvatarResource.class); > > return router; > } > > Any thoughts on this? > > Thanks in advance! > > Regards, > > Rodrigo > > ------------------------------------------------------ > > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2969868 > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2969880