Sorry, had a typo in my original post. I tried:
router.attach("/", DefaultResource.class);
router.attach("/{year}", SpecialResource.class);
And all requests to "/" still go to the special resource. This seems like a
pretty standard configuration so I'm not sure why it's behaving this way.
Surely people use "/" all the time without problems, so am I forgetting to set
something else? Here's my entire code for createRoot():
Router router = new Router(getContext());
router.attach("/", DefaultResource.class);
router.attach("/{year}", SpecialResource.class);
return router;
Straight from the tutorial really. Ive also tried setting the
defaultMatchingMode to BEST, FIRST, and LAST, and all have the same behavior.
As for your suggestion with making param match alpha_num, is there a way to do
this with restlets or would I just supply a regex? In the latter case, how
would the resource get the parameter since it's not named?
Thanks,
Mike
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1064629