Author: remy.maucherat(a)jboss.com
Date: 2009-01-23 13:16:50 -0500 (Fri, 23 Jan 2009)
New Revision: 910
Modified:
trunk/java/org/apache/catalina/deploy/FilterMap.java
Log:
- Port cleanup using the new API.
Modified: trunk/java/org/apache/catalina/deploy/FilterMap.java
===================================================================
--- trunk/java/org/apache/catalina/deploy/FilterMap.java 2009-01-21 10:22:10 UTC (rev
909)
+++ trunk/java/org/apache/catalina/deploy/FilterMap.java 2009-01-23 18:16:50 UTC (rev
910)
@@ -19,10 +19,13 @@
package org.apache.catalina.deploy;
-import org.apache.catalina.util.RequestUtil;
import java.io.Serializable;
+import javax.servlet.DispatcherType;
+import org.apache.catalina.util.RequestUtil;
+
+
/**
* Representation of a filter mapping for a web application, as represented
* in a <code><filter-mapping></code> element in the
deployment
@@ -161,7 +164,7 @@
public void setDispatcher(String dispatcherString) {
String dispatcher = dispatcherString.toUpperCase();
- if (dispatcher.equals("FORWARD")) {
+ if (dispatcher.equals(DispatcherType.FORWARD.name())) {
// apply FORWARD to the global dispatcherMapping.
switch (dispatcherMapping) {
@@ -174,7 +177,7 @@
case REQUEST_ERROR_INCLUDE : dispatcherMapping =
REQUEST_ERROR_FORWARD_INCLUDE; break;
case REQUEST_INCLUDE : dispatcherMapping = REQUEST_FORWARD_INCLUDE;
break;
}
- } else if (dispatcher.equals("INCLUDE")) {
+ } else if (dispatcher.equals(DispatcherType.INCLUDE.name())) {
// apply INCLUDE to the global dispatcherMapping.
switch (dispatcherMapping) {
case NOT_SET : dispatcherMapping = INCLUDE; break;
@@ -186,7 +189,7 @@
case REQUEST_ERROR_FORWARD : dispatcherMapping =
REQUEST_ERROR_FORWARD_INCLUDE; break;
case REQUEST_FORWARD : dispatcherMapping = REQUEST_FORWARD_INCLUDE;
break;
}
- } else if (dispatcher.equals("REQUEST")) {
+ } else if (dispatcher.equals(DispatcherType.REQUEST.name())) {
// apply REQUEST to the global dispatcherMapping.
switch (dispatcherMapping) {
case NOT_SET : dispatcherMapping = REQUEST; break;
@@ -198,7 +201,7 @@
case INCLUDE_FORWARD : dispatcherMapping = REQUEST_FORWARD_INCLUDE;
break;
case INCLUDE_ERROR_FORWARD : dispatcherMapping =
REQUEST_ERROR_FORWARD_INCLUDE; break;
}
- } else if (dispatcher.equals("ERROR")) {
+ } else if (dispatcher.equals(DispatcherType.ERROR.name())) {
// apply ERROR to the global dispatcherMapping.
switch (dispatcherMapping) {
case NOT_SET : dispatcherMapping = ERROR; break;
Show replies by date