From tomcat-dev-return-54623-apmail-jakarta-tomcat-dev-archive=jakarta.apache.org@jakarta.apache.org Thu Jan 06 00:27:45 2005 Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@www.apache.org Received: (qmail 18309 invoked from network); 6 Jan 2005 00:27:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Jan 2005 00:27:44 -0000 Received: (qmail 7625 invoked by uid 500); 6 Jan 2005 00:27:37 -0000 Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 7545 invoked by uid 500); 6 Jan 2005 00:27:37 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 7531 invoked by uid 99); 6 Jan 2005 00:27:37 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 05 Jan 2005 16:27:35 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (8.12.11/8.12.11) with ESMTP id j060RWSf016862 for ; Thu, 6 Jan 2005 01:27:32 +0100 Received: (from nobody@localhost) by ajax.apache.org (8.12.11/8.12.11/Submit) id j060RWMO016860; Thu, 6 Jan 2005 01:27:32 +0100 Date: Thu, 6 Jan 2005 01:27:32 +0100 Message-Id: <200501060027.j060RWMO016860@ajax.apache.org> From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 25965] - RequestDispatcher fails after cross context include X-Bugzilla-Reason: AssignedTo X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=25965 ------- Additional Comments From markt@apache.org 2005-01-06 01:27 ------- The following quotes are from section SRV.14.2.5.1 (RequestDispatcher methods) of the spec. public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server. This method allows one servlet to do preliminary processing of a request and another resource to generate the response. For a RequestDispatcher obtained via getRequestDispatcher(), the ServletRequest object has its path elements and parameters adjusted to match the path of the target resource. ... The request and response parameters must be either the same objects as were passed to the calling servlet’s service method or be subclasses of the ServletRequestWrapper or ServletResponseWrapper classes that wrap them. public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException Includes the content of a resource (servlet, JSP page, HTML file) in the response. In essence, this method enables programmatic server-side includes. The ServletResponse object has its path elements and parameters remain unchanged from the caller’s. The included servlet cannot change the response status code or set headers; any attempt to make a change is ignored. The request and response parameters must be either the same objects as were passed to the calling servlet’s service method or be subclasses of the ServletRequestWrapper or ServletResponseWrapper classes that wrap them. To address the question raised by Bill above, ie what is the "current servlet context" consider the case of a relative path. Relative paths are, by definition, relative to the current request. The current request (since we are doing includes not forwards) is still the original request (to context A). Hence the path is relative to the original request. Since it is relative to the original request the path must be within the original servlet context. Therefore, the "current servlet context" must be the original context (client or context A in the discussion above). -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org