tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Williams" <>
Subject Re: response.sendRedirect
Date Fri, 05 Sep 2003 18:21:39 GMT
Say you're accessing pages on localhost, so your URLs take the form
then the servlet container root is http://localhost:8080/ and a redirect to
"/another-war-file/another.jsp" would be a redirect to:

In sendRedirect, I'm fairly sure that you simply use "/cal/form/index.jsp".
That sort of pattern always works for my webapps.

----- Original Message ----- 
From: "Charlie Toohey" <>
To: <>
Sent: Friday, September 05, 2003 7:07 PM
Subject: response.sendRedirect

> The Servlet API doc for the sendRedirect method states:
> "....If the location is relative with a leading '/' the container
> it as relative to the servlet container root....."
> I've looked thru the Servlet Spec and can not quite figure out what they
> by servlet container root ? Is this a typo and supposed to be servlet
> root ? Or is there really such a thing as the servlet container root, and
> so, what is it ?
> e.g. if my context path is "/cal" and I want to redirect to
> "/cal/form/index.jsp", what would I use in sendRedirect ?
> (I know I could do a forward, but want to redirect in my situation)
> Thanks,
> Charlie
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message