1. I was looking for a way to set routing  to serve a dynamic content (home
page) from the root (nothing is specified) and static files from the root if
file name is specified. I found that this is working:

    Directory directory = new Directory(getContext(),
Constants.STATIC_FILE_LOCATION);
    router.attach("/files", directory);
    router.attach("", directory);
    router.attach("/", HomeResource.class);

I am wondering if the last two lines are a hack, or indeed that's how it's
intended. I am also wondering how do you solve this "dilemma" on your site -
obviously you did it since http://www.restlet.org/favicon.ico works correctly
and http://www.restlet.org resolves as well.

2. Another question - is there an easy way to get HTTP_Referer value for a
regular HTTP request? I am looking for an API similar to
request.getClientInfo().getAgent() for user agent.

Thanks,

Serge

Reply via email to