PathMatcher implementation for Ant-style path patterns.
Examples are provided below.
Part of this mapping code has been kindly borrowed from
Apache Ant.
The mapping matches URLs using the following rules:
- ? matches one character
- * matches zero or more characters
- ** matches zero or more 'directories' in a path
Some examples:
com/t?st.jsp
- matches com/test.jsp
but also
com/tast.jsp
or com/txst.jsp
com/*.jsp
- matches all .jsp
files in the
com
directory
com/**/test.jsp
- matches all test.jsp
files underneath the com
path
org/apache/shiro/**/*.jsp
- matches all .jsp
files underneath the org/apache/shiro
path
org/**/servlet/bla.jsp
- matches
org/apache/shiro/servlet/bla.jsp
but also
org/apache/shiro/testing/servlet/bla.jsp
and
org/servlet/bla.jsp
N.B.: This class was forked from Apache Shiro with modifications.
As per the Apache 2.0 license, the original copyright notice and all author and copyright information have
remained in tact.