[racket] External CSS w/ Templates?

From: Nadeem Abdul Hamid (nadeem at acm.org)
Date: Wed Sep 7 11:38:11 EDT 2011

On Wed, Sep 7, 2011 at 1:40 AM, Veer <diggerrrrr at gmail.com> wrote:
> If my link tag is
> <link rel="stylesheet" href="index.css" type="text/css">
> Then browser does not find index.css , but when my link tag is
> If it is :
> <link rel="stylesheet" href="/index.css" type="text/css">
> Then browser is able to apply the index.css .
>
> I am not too sure why is it so.
>

If you look at the URL that your servlet runs from, by default it is
"/servlets/standalone.rkt", so if you use a relative URL of
"index.css" it will look for the static file using the path
"servlets/index.css", i.e. inside a "servlets" directory with respect
to server-root-path or extra-files-paths.


Posted on the users mailing list.