After looking at the archives and thumbing through some books, I'm afraid I
know the answer to this question but I'd like to ask it just to make sure.
Is there any way using relative pathing that I can forward to another
servlet or JSP that is on the same host but not in the same context as my
original servlet?

For example, within http://hostname/application/servlet/MyServlet I want to
use

        getServletContext().getRequestDispatcher( myPath ).forward( req, res
);

to forward to a login servlet that has the URL
http://hostname/login/servlet/LoginServlet.  The ServletContext is
http://hostname/application, so is there any value that I can plug in for
myPath that will allow me to use forward to get to the LoginServlet?  I
understand that I can use sendRedirect(), but prefer not to since I do not
want the URL displayed in the browser to change.  Any suggestions as to how
I might address this?

Thanks,
Todd Murphy
Hershey Foods

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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

Reply via email to