Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49207
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 28 Apr 2010 16:21:32 +0000 (16:21 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 28 Apr 2010 16:21:32 +0000 (16:21 +0000)
FilterMap#filterName was null when it was configured dynamically with addMappingForUrlPatterns()
Patch provided by Pid

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@939001 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/ApplicationFilterRegistration.java

index 260d300..93a6227 100644 (file)
@@ -86,7 +86,9 @@ public class ApplicationFilterRegistration
             String... urlPatterns) {
 
         FilterMap filterMap = new FilterMap();
-        
+
+        filterMap.setFilterName(filterDef.getFilterName());
+
         if (dispatcherTypes != null) {
             for (DispatcherType dispatcherType : dispatcherTypes) {
                 filterMap.setDispatcher(dispatcherType.name());