DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28222>.
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 [EMAIL PROTECTED]  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.
      *
+     * <p>If this request has been forwarded using
+     * [EMAIL PROTECTED] 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.
+     *
      * <p>Because this method returns a <code>StringBuffer</code>,
      * 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to