jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Tomcat vs Websphere sendRedirect (fwd)
Date Mon, 07 Oct 2002 22:30:12 GMT
Sounds like a good opportunity for an additional Watchdog (and ultimately
CTS) test ...

Craig

---------- Forwarded message ----------
Date: Mon, 7 Oct 2002 15:21:17 -0700 (PDT)
From: Craig R. McClanahan <craigmcc@apache.org>
Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
To: Tomcat Users List <tomcat-user@jakarta.apache.org>
Subject: Re: Tomcat vs Websphere sendRedirect



On Mon, 7 Oct 2002, Jared Reeve wrote:

> Date: Mon, 7 Oct 2002 14:56:36 -0700 (PDT)
> From: Jared Reeve <jaawohl@yahoo.com>
> Reply-To: Tomcat Users List <tomcat-user@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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:watchdog-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:watchdog-dev-help@jakarta.apache.org>


Mime
View raw message