You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Smith <sa...@home.com> on 2000/12/01 02:34:21 UTC

Re: hrefs in documents and sendRedirect()

Russell,

In order to use

response.sendRedirect("/somepage.html");

you need to be working in the root context. Out of the box, this means
document path webapps/Root/somepage.html
(at least for tomcat 3.1).

If you make your own context, you will need /contextname/somepage.html,
which will translate to webapps/contextname/somepage.html. All of that stuff
is configurable. Please study server.xml to figure
out how.


Good luck,

Dave

----- Original Message -----
From: "Russell Freeman" <Ru...@sagemaker.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, November 30, 2000 10:12 AM
Subject: hrefs in documents and sendRedirect()


> To restate a so far unresolved problem,
>
> Do I need to include the name of my context in all hyperlinks, e.g. if my
> context is /foo, then a link will be <a href="/foo/index.html">, my
> stylesheet will be in "/foo/styles.css" etc.
>
> So far things only work if I add the context prefix but not for
> sendRedirect(), which seems to not need it?
>
> Confused,
> Russ
>