I need help. (I use Tomcat 4.1.18)
I'm in JSP1 in a webapp (Webapp1) and I use
RequestDispatcher.forward(request, response) to forward in JSP2 located in
another webapp (Webapp2). The two webapps are on the same server. The
forwarding works, but once I'm in the JSP2 (in Webapp2), it looks like I'm
still in the context of Webapp1, the URL of the request remains the URL of
JSP1 in Webapp1. However, the servlet API documentation specifically says:
"For a RequestDispatcher obtained via getRequestDispatcher(), the
ServletRequest object has its path elements and parameters adjusted to
match the path of the target resource".
Here is a simplified part of the code I use in JSP1:
ServletContext contxt = getServletContext().getContext("/Webapp2");
RequestDispatcher disp =
contxt.getRequestDispatcher("/JSPinWebapp2.jsp");
disp.forward(request, response);
Is this a bug, or is there something that I'm missing or not understanding
about forwarding?
Simon Senécal
Lab-Volt Québec (Software Development)
418-849-1000 #348
http://www.labvolt.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- RE: RequestDispatcher.forward() problem Simon Senécal
- RE: RequestDispatcher.forward() problem John Trollinger
- RequestDispatcher.forward() problem Simon Senécal
- RE: RequestDispatcher.forward() problem John Trollinger