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/02/02 19:36:07 UTC
DO NOT REPLY [Bug 26611] New: -
Improper handling of javax.servlet.forward.request_uri during a forward and then an include
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26611>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26611
Improper handling of javax.servlet.forward.request_uri during a forward and then an include
Summary: Improper handling of javax.servlet.forward.request_uri
during a forward and then an include
Product: Tomcat 5
Version: 5.0.18
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: kris@dotech.com
CC: kris@dotech.com
Basically, it looks like "javax.servlet.forward.request_uri" is part of the
enumeration returned by request.getAttributeNames even though
request.getAttribute("javax.servlet.forward.request_uri") returns null. Here's a
simple test setup:
forward.jsp:
------------
<jsp:forward page="${param.forward}"/>
include.jsp:
------------
<%@ page contentType="text/plain" %>
<jsp:include page="${param.include}"/>
process.jsp:
------------
<%@ page contentType="text/plain" %>
<%@ page import="java.util.*" %>
<%
ArrayList attrNames = Collections.list(request.getAttributeNames());
pageContext.setAttribute("include.request_uri.name",
Boolean.valueOf(attrNames.contains("javax.servlet.include.request_uri")));
pageContext.setAttribute("forward.request_uri.name",
Boolean.valueOf(attrNames.contains("javax.servlet.forward.request_uri")));
%>
include.request_uri name: ${pageScope['include.request_uri.name']}
include.request_uri value: ${requestScope['javax.servlet.include.request_uri']}
forward.request_uri name: ${pageScope['forward.request_uri.name']}
forward.request_uri value: ${requestScope['javax.servlet.forward.request_uri']}
So, if you request:
forward.jsp?forward=include.jsp&include=process.jsp
You'll get the following:
include.request_uri name: true
include.request_uri value: /process.jsp
forward.request_uri name: true
forward.request_uri value:
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org