tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Smith" <sat-g...@home.com>
Subject Re: hrefs in documents and sendRedirect()
Date Fri, 01 Dec 2000 01:34:21 GMT
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" <Russell.Freeman@sagemaker.com>
To: <tomcat-user@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
>


Mime
View raw message