--- java/org/apache/catalina/core/ApplicationFilterFactory.java (revision 502340) +++ java/org/apache/catalina/core/ApplicationFilterFactory.java (working copy) @@ -234,7 +234,7 @@ // Check the specific "*" special URL pattern, which also matches // named dispatches - if (filterMap.getAllMatch()) + if (filterMap.getMatchAllUrlPatterns()) return (true); if (requestPath == null) @@ -319,6 +319,10 @@ if (servletName == null) { return (false); + } + // Check the specific "*" special servlet name + else if (filterMap.getMatchAllServletNames()) { + return (true); } else { String[] servletNames = filterMap.getServletNames(); for (int i = 0; i < servletNames.length; i++) { --- java/org/apache/catalina/deploy/FilterMap.java (revision 502340) +++ java/org/apache/catalina/deploy/FilterMap.java (working copy) @@ -87,6 +87,9 @@ } public void addServletName(String servletName) { + if ("*".equals(servletName)) { + this.matchAllServletNames = true; + } String[] results = new String[servletNames.length + 1]; System.arraycopy(servletNames, 0, results, 0, servletNames.length); results[servletNames.length] = servletName; @@ -95,16 +98,26 @@ /** - * The flag that indicates this mapping will match all. + * The flag that indicates this mapping will match all url-patterns */ - private boolean allMatch = false; + private boolean matchAllUrlPatterns = false; - public boolean getAllMatch() { - return allMatch; + public boolean getMatchAllUrlPatterns() { + return matchAllUrlPatterns; } /** + * The flag that indicates this mapping will match all servlet-names + */ + private boolean matchAllServletNames = false; + + public boolean getMatchAllServletNames() { + return matchAllServletNames; + } + + + /** * The URL pattern this mapping matches. */ private String[] urlPatterns = new String[0]; @@ -115,7 +128,7 @@ public void addURLPattern(String urlPattern) { if ("*".equals(urlPattern)) { - this.allMatch = true; + this.matchAllUrlPatterns = true; } else { String[] results = new String[urlPatterns.length + 1]; System.arraycopy(urlPatterns, 0, results, 0, urlPatterns.length);