Author: remm Date: Mon Apr 3 17:03:14 2006 New Revision: 391184 URL: http://svn.apache.org/viewcvs?rev=391184&view=rev Log: - Add support for the new "*" special URL pattern for filters.
Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java tomcat/tc6.0.x/trunk/java/org/apache/catalina/deploy/FilterMap.java Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java URL: http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java?rev=391184&r1=391183&r2=391184&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java Mon Apr 3 17:03:14 2006 @@ -196,13 +196,18 @@ /** * Return <code>true</code> if the context-relative request path * matches the requirements of the specified filter mapping; - * otherwise, return <code>null</code>. + * otherwise, return <code>false</code>. * * @param filterMap Filter mapping being checked * @param requestPath Context-relative request path of this request */ private boolean matchFiltersURL(FilterMap filterMap, String requestPath) { + // Check the specific "*" special URL pattern, which also matches + // named dispatches + if (filterMap.getAllMatch()) + return (true); + if (requestPath == null) return (false); Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/deploy/FilterMap.java URL: http://svn.apache.org/viewcvs/tomcat/tc6.0.x/trunk/java/org/apache/catalina/deploy/FilterMap.java?rev=391184&r1=391183&r2=391184&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/deploy/FilterMap.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/deploy/FilterMap.java Mon Apr 3 17:03:14 2006 @@ -89,6 +89,16 @@ this.servletName = servletName; } + + /** + * The flag that indicates this mapping will match all. + */ + private boolean allMatch = false; + + public boolean getAllMatch() { + return allMatch; + } + /** * The URL pattern this mapping matches. @@ -100,7 +110,11 @@ } public void setURLPattern(String urlPattern) { - this.urlPattern = RequestUtil.URLDecode(urlPattern); + if ("*".equals(urlPattern)) { + this.allMatch = true; + } else { + this.urlPattern = RequestUtil.URLDecode(urlPattern); + } } /** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]