Hi Michael,

Could you try this instead:

router.attach("/", DefaultResource.class);
router.attach("/{param}", SpecialResource.class); 

Otherwise, you could specialize the "param" variable type to only match 
alpha_num characters for example, preventing to '/' match.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-----Message d'origine-----
De : [email protected] [mailto:[email protected]] 
Envoye : dimanche 25 janvier 2009 23:21
A : [email protected]
Objet : Default Routes

I have routes set up as follows:

router.attachDefault(DefaultResource.class);
router.attach("{param}", SpecialResource.class);

I would expect all requests to "/" to go to DefaultResource, but they keep 
going to SpecialResource.  I have even tried adding an
explicit route:

router.attach("/", DefaultResource.class)

But it still goes to SpecialResource.  Without the route for SpecialResource, 
requests to DefaultResource work as expected.  I
apologize if I'm over-looking something simple, I'm quite new to Restlets and 
am just going off the tutorial right now.

Regards,

Michael

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

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

Reply via email to