> From: David Goodenough [mailto:david.goodeno...@btconnect.com]
> 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


Reply via email to