tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <>
Subject RE: trouble with url-pattern in a filter-mapping (tomcat 6)
Date Fri, 20 Aug 2010 22:28:39 GMT
> From: David Goodenough []
> Subject: Re: trouble with url-pattern in a filter-mapping (tomcat 6)
> seems to me not to allow for anything without either a 
> leading / or a *.

Exactly as required by the spec.  Did you read it?

> SRV.11.2 Specification of Mappings
> In the Web application deployment descriptor, the following syntax is
> used to define
> mappings:
> • A string beginning with a ‘/’ character and ending with a ‘/*’ suffix
> is used for path mapping.
> • A string beginning with a ‘*.’ prefix is used as an extension mapping.
> • A string containing only the ’/’ character indicates the "default"
> servlet of the application. In this case the servlet path is the request
> URI minus the context path and the path info is null.
> • All other strings are used for exact matches only.

Note the last bullet means you must have an _exact_ match with the URL, including the leading

> Just changing it to a wildcard fixed it.  The only thing I 
> changed was the <uri-pattern> tag, from "page.htm" to "*.htm".

Which means every HTML file you've got will trigger the filter.

 - Chuck

View raw message