You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jared Reeve <ja...@yahoo.com> on 2002/10/07 23:56:36 UTC
Tomcat vs Websphere sendRedirect
In WebSphere I do a sendRedirect("/servlet/MyServlet") within a servlet and it works successfully. It prepends the host and root URI. Why can't I do the same thing in Tomcat? It does not prepend the root URI. Do I not have something configured correctly? I would like to port this application without changing any code. Thanks.
function SetDomain(d) { document.domain = d; }
---------------------------------
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com
Re: Tomcat vs Websphere sendRedirect
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 7 Oct 2002, Jared Reeve wrote:
> Date: Mon, 7 Oct 2002 14:56:36 -0700 (PDT)
> From: Jared Reeve <ja...@yahoo.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: tomcat-user@jakarta.apache.org
> Subject: Tomcat vs Websphere sendRedirect
>
>
> In WebSphere I do a sendRedirect("/servlet/MyServlet") within a servlet
> and it works successfully. It prepends the host and root URI. Why
> can't I do the same thing in Tomcat? It does not prepend the root URI.
> Do I not have something configured correctly? I would like to port this
> application without changing any code. Thanks. function SetDomain(d) {
> document.domain = d; }
>
Websphere appears to be broken in this respect. See the last sentence of
the first paragraph in the Javadocs for sendRedirect():
If the location is relative with a leading '/'
the container interprets it as relative to the
servlet container root.
Note that the servlet container root is *not* the same as the context
root, unless you happen to be in the default webapp that has a context
path of "".
Craig
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>