You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/04/06 04:36:36 UTC
DO NOT REPLY [Bug 28222] New: -
getRequestURL() in forwarded jsp/servlet doesn't return new url
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
getRequestURL() in forwarded jsp/servlet doesn't return new url
Summary: getRequestURL() in forwarded jsp/servlet doesn't return
new url
Product: Tomcat 4
Version: 4.1.30
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Servlet & JSP API
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: hughjlee@yahoo.com
1.jsp:
<%getServletContext().getRequestDispatcher("/2.jsp").forward(request,
response);%>
2.jsp:
<%out.print(request.getRequestURL());%>
The output of 2.jsp is "http://.../1.jsp" but NOT "http://...2.jsp". According
to SRV8.4, "The path elements of the request object exposed to the target
servlet must reflect the path used to obtain the RequestDispatcher." In this
test case, "path used to obtain the RequestDispatcher" is "/2.jsp", so
getRequestURL() in 2.jsp should return "http://...2.jsp".
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org