Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 88049 invoked from network); 3 Nov 2005 01:42:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Nov 2005 01:42:08 -0000 Received: (qmail 38498 invoked by uid 500); 3 Nov 2005 01:41:59 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 38331 invoked by uid 500); 3 Nov 2005 01:41:58 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 38300 invoked by uid 500); 3 Nov 2005 01:41:58 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 38291 invoked by uid 99); 3 Nov 2005 01:41:58 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Nov 2005 17:41:56 -0800 Received: by ajax.apache.org (Postfix, from userid 99) id BE1955BF; Thu, 3 Nov 2005 02:41:35 +0100 (CET) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 28222] - getRequestURL() in forwarded jsp/servlet doesn't return new url X-Bugzilla-Reason: AssignedTo Message-Id: <20051103014135.BE1955BF@ajax.apache.org> Date: Thu, 3 Nov 2005 02:41:35 +0100 (CET) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.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=28222 ------- Additional Comments From jan.luehe@sun.com 2005-11-03 02:41 ------- I just filed Issue 26 ("[javadocs] HttpServletRequest.getRequestURL() does not consider RD.forward() scenario") with the Servlet EG, see https://servlet-spec-eg.dev.java.net/issues/show_bug.cgi?id=26, with the following description: ====================================================================== The javadocs of javax.servlet.http.HttpServletRequest.getRequestURL() have been misleading and causing confusion among developers. See http://issues.apache.org/bugzilla/show_bug.cgi?id=28222, Synopsis: "getRequestURL() in forwarded jsp/servlet doesn't return new url", for details. I am proposing the following clarification to the javadocs of javax.servlet.http.HttpServletRequest.getRequestURL(): Index: HttpServletRequest.java =================================================================== RCS file: /cvs/glassfish/servlet-api/src/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpServletRequest.java,v retrieving revision 1.2 diff -u -r1.2 HttpServletRequest.java --- HttpServletRequest.java 16 Aug 2005 02:02:08 -0000 1.2 +++ HttpServletRequest.java 1 Nov 2005 18:31:11 -0000 @@ -535,6 +535,11 @@ * number, and server path, but it does not include query * string parameters. * + *

If this request has been forwarded using + * {@link javax.servlet.RequestDispatcher#forward}, the server path in the + * reconstructed URL must reflect the path used to obtain the + * RequestDispatcher, and not the server path specified by the client. + * *

Because this method returns a StringBuffer, * not a string, you can modify the URL easily, for example, * to append query parameters. =================================================================== We still have a small window of opportunity where clarifications of this kind may be added to the Servlet 2.5 spec. -- 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: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org