tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eriksson, Michael" <Michael.Eriks...@bauer-partner.com>
Subject getRequestURI after forward
Date Fri, 17 Jan 2003 15:11:51 GMT
Hallo Remy,

I have noted that request.getRequestURI in an error page
delivers the URI of the request page whereas getRequestURL
refers to the originally called resource. This is probably
the same (much more general) case described in
http://issues.apache.org/bugzilla/show_bug.cgi?id=8409.

This bug report was marked as invalid by you with the
indication that getRequestURI delivers a path element, which
according to section 8.4 in the servlet spec should be
altered accordingly when forwarding.

I am not quite sure if this interpretation is true. For one
thing section 4.4 (request path elements) explicitly lists
the methods accessing path elements
(getContextPath/ServletPath/PathInfo), but makes no mention
of getRequestURI.

It does however say:
requestURI = contextPath + servletPath + pathInfo

Further the corresponding java doc comment
(http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/http/HttpServletRequest.html#getRequestURI())
leads the reader to believe that the original request URI is
meant.

My interpretation would be that requestURI as an abstract
concept should be considered a path element that changes
with a forward. However, the _method_ getRequestURI should
(strangely inconsistent) deliver the pre-forward value.

What is your take on this?


GrĂ¼sse,

Michael

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message