Author: remy.maucherat(a)jboss.com
Date: 2008-09-17 08:27:14 -0400 (Wed, 17 Sep 2008)
New Revision: 780
Modified:
trunk/java/org/apache/catalina/core/ApplicationContext.java
trunk/java/org/apache/catalina/core/ApplicationDispatcher.java
trunk/webapps/docs/changelog.xml
Log:
- Different take on Tomcat's patch to fix filters mapping in dispatchers.
Modified: trunk/java/org/apache/catalina/core/ApplicationContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationContext.java 2008-09-17 12:26:33 UTC
(rev 779)
+++ trunk/java/org/apache/catalina/core/ApplicationContext.java 2008-09-17 12:27:14 UTC
(rev 780)
@@ -327,7 +327,7 @@
if (wrapper == null)
return (null);
- return new ApplicationDispatcher(wrapper, null, null, null, null, name);
+ return new ApplicationDispatcher(wrapper, null, null, null, null, null, name);
}
@@ -429,6 +429,7 @@
}
Wrapper wrapper = (Wrapper) mappingData.wrapper;
+ String requestPath = mappingData.requestPath.toString();
String wrapperPath = mappingData.wrapperPath.toString();
String pathInfo = mappingData.pathInfo.toString();
@@ -436,7 +437,7 @@
// Construct a RequestDispatcher to process this request
return new ApplicationDispatcher
- (wrapper, uriCC.toString(), wrapperPath, pathInfo,
+ (wrapper, uriCC.toString(), requestPath, wrapperPath, pathInfo,
queryString, null);
}
Modified: trunk/java/org/apache/catalina/core/ApplicationDispatcher.java
===================================================================
--- trunk/java/org/apache/catalina/core/ApplicationDispatcher.java 2008-09-17 12:26:33 UTC
(rev 779)
+++ trunk/java/org/apache/catalina/core/ApplicationDispatcher.java 2008-09-17 12:27:14 UTC
(rev 780)
@@ -162,6 +162,7 @@
* @param wrapper The Wrapper associated with the resource that will
* be forwarded to or included (required)
* @param requestURI The request URI to this resource (if any)
+ * @param requestPath The revised path to this resource, relative to the context (if
any)
* @param servletPath The revised servlet path to this resource (if any)
* @param pathInfo The revised extra path information to this resource
* (if any)
@@ -171,7 +172,7 @@
* else <code>null</code>
*/
public ApplicationDispatcher
- (Wrapper wrapper, String requestURI, String servletPath,
+ (Wrapper wrapper, String requestURI, String requestPath, String servletPath,
String pathInfo, String queryString, String name) {
super();
@@ -180,6 +181,7 @@
this.wrapper = wrapper;
this.context = (Context) wrapper.getParent();
this.requestURI = requestURI;
+ this.requestPath = requestPath;
this.servletPath = servletPath;
this.pathInfo = pathInfo;
this.queryString = queryString;
@@ -226,6 +228,12 @@
/**
+ * The request path for this RequestDispatcher.
+ */
+ private String requestPath = null;
+
+
+ /**
* The request URI for this RequestDispatcher.
*/
private String requestURI = null;
@@ -429,7 +437,7 @@
if (disInt.intValue() != ApplicationFilterFactory.ERROR) {
state.outerRequest.setAttribute
(ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
- servletPath);
+ requestPath);
state.outerRequest.setAttribute
(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR,
Integer.valueOf(ApplicationFilterFactory.FORWARD));
@@ -499,7 +507,7 @@
Integer.valueOf(ApplicationFilterFactory.INCLUDE));
wrequest.setAttribute(
ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
- servletPath);
+ requestPath);
invoke(state.outerRequest, state.outerResponse, state);
}
@@ -531,7 +539,7 @@
Integer.valueOf(ApplicationFilterFactory.INCLUDE));
wrequest.setAttribute(
ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
- servletPath);
+ requestPath);
invoke(state.outerRequest, state.outerResponse, state);
}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-09-17 12:26:33 UTC (rev 779)
+++ trunk/webapps/docs/changelog.xml 2008-09-17 12:27:14 UTC (rev 780)
@@ -19,7 +19,15 @@
<section name="JBoss Web 2.1.1.GA (remm)">
<subsection name="Catalina">
<changelog>
- <bug>45785</bug>: Add a check in the loader in addition to the fix for
JBAS-4965. (markt)
+ <fix>
+ <bug>45785</bug>: Add a check in the loader in addition to the fix
for JBAS-4965. (markt)
+ </fix>
+ <fix>
+ <bug>45823</bug>: Log missing request headers as - not null. Based on
a patch by Per Landberg. (markt)
+ </fix>
+ <fix>
+ <bug>45441</bug>: Correctly map filters for FORWARD and INCLUDE.
(remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">