> You can switch the matching mode on the default page to be exact
> matching instead of starts-with. Something like:
>
> router
> .attach ("/", new HomePageRestlet)
> .getTemplate().setMatchingMode(Template.MODE_EQUALS);
Thanks, that does indeed do it. So from a make-it-work perspective, I'm fine.
Thinking more broadly, should the default really be the inexact match? And
if so, should there be a way to change the default template mode for a
given Router?
The best I came up with was subclassing Router, overriding createRoute,
and putting the setMatchingMode bit in there. However, that then breaks
setDefaultRoute, which is not so good.
Also, I'm wondering if the Template mode should be an enum rather than an
int; at first glance it looked to me like the Restlet library was leaning
toward enums for type safety.
Thanks,
William