It should also work if the FilterMapping is the same as the ServletMapping.
The spec dictates the rules for mapping and are as follows:
1. The container will try to find an exact match of the path of the request to the
path of the servlet. A successful match selects the servlet.
2. The container will recursively try to match the longest path-prefix: This is done
by stepping down the path tree a directory at a time, using the �/� character as
a path separator. The longest match determines the servlet selected.
3. If the last segment in the URL path contains an extension (e.g. .jsp), the serv-let
container will try to match a servlet that handles requests for the extension.
An extension is defined as the part of the last segment after the last �.� char-acter.
4. If neither of the previous three rules result in a servlet match, the container will
attempt to serve content appropriate for the resource requested. If a "default"
servlet is defined for the application, it will be used.
These are directly from the 2.3 spec. Of course, Filters are still new, so there may be issues. Play with the mapping and see what works for the server you are using. I've played with it in Tomcat and had no problems, but I only tried a few specific
test.