Re: Tomcat vs Websphere sendRedirect (fwd)
"Craig R. McClanahan" <[email protected]> Mon, 7 Oct 2002 15:30:12 -0700 (PDT)
| Newsgroups | gmane.comp.jakarta.watchdog.devel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> Reply-To: Tomcat Users List <[email protected]> To: Tomcat Users List <[email protected]> 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 <[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]>