>
> For instance, my web-app has a context path of "/cvg" and the servlet I
> want to redirect to is mapped to "/dispatch". If I call
> response.sendRedirect("/dispatch") on Orion, it translates the redirect
> to "http://myhost/cvg/dispatch", however, on JRun, it translates it to
> "http://myhost/dispatch". To get the result I want on JRun, I have to
> make my call as response.sendredirect(request.getContextPath() +
> "/dispatch").
>
Orion was actually doing it wrong. "/dispatch" is an absolute path, what you
want is just "dispatch".
So,
response.sendRedirect(response.encodeRedirectURL("dispatch"));
will always take you from the current context to the current context plus
"/dispatch", while
response.sendRedirect(response.encodeRedirectURL("/dispatch"));
will always take you to the page "/dispatch" on the same host and port as
the current context.
_3
M
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets