On Mon, 7 Oct 2002, Jared Reeve wrote:

> Date: Mon, 7 Oct 2002 14:56:36 -0700 (PDT)
> From: Jared Reeve <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> 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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to