PathPattern instances that can
then be matched to requests.
The PathPatternParser and PathPattern are specifically
designed for use with HTTP URL paths in web applications where a large number
of URI path patterns, continuously matched against incoming requests,
motivates the need for efficient matching.
For details of the path pattern syntax see PathPattern.
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| public static final PathPatternParser | defaultInstance
Shared, read-only instance of |
| private boolean | |
| private PathContainer. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public PathContainer. | |
| public String | Returns: the updated patternthe pattern to initialize pattern)Prepare the given pattern for use in matching to full URL paths. |
| public boolean | |
| public boolean | isMatchOptionalTrailingSeparator()
Deprecated
since 6.0. as of 6.0 together with
Whether optional trailing slashing match is enabled.
setMatchOptionalTrailingSeparator(boolean).
|
| public PathPattern | |
| public void | setCaseSensitive(boolean caseSensitive)
Configure whether path pattern matching should be case-sensitive. |
| public void | setMatchOptionalTrailingSeparator(boolean matchOptionalTrailingSeparator)
Deprecated
since 6.0. transparent support for trailing slashes is deprecated as of
6.0 in favor of configuring explicit redirects through a proxy,
Servlet/web filter, or a controller.
Configure whether a PathPattern produced by this parser should
automatically match request paths with a trailing slash.
|
| public void |
| caseSensitive | back to summary |
|---|---|
| private boolean caseSensitive | |
| defaultInstance | back to summary |
|---|---|
| public static final PathPatternParser defaultInstance Shared, read-only instance of Uses default settings:
| |
| matchOptionalTrailingSeparator | back to summary |
|---|---|
| private boolean matchOptionalTrailingSeparator | |
| pathOptions | back to summary |
|---|---|
| private PathContainer. | |
| PathPatternParser | back to summary |
|---|---|
| public PathPatternParser() | |
| getPathOptions | back to summary |
|---|---|
| public PathContainer. Get the
| |
| initFullPathPattern | back to summary |
|---|---|
| public String initFullPathPattern(String pattern) Prepare the given pattern for use in matching to full URL paths. By default, prepend a leading slash if needed for non-empty patterns. | |
| isCaseSensitive | back to summary |
|---|---|
| public boolean isCaseSensitive() Whether case-sensitive pattern matching is enabled. | |
| isMatchOptionalTrailingSeparator | back to summary |
|---|---|
| public boolean isMatchOptionalTrailingSeparator()
Whether optional trailing slashing match is enabled.
| |
| parse | back to summary |
|---|---|
| public PathPattern parse(String pathPattern) throws PatternParseException Process the path pattern content, a character at a time, breaking it into
path elements around separator boundaries and verifying the structure at each
stage. Produces a PathPattern object that can be used for fast matching
against paths. Each invocation of this method delegates to a new instance of
the
| |
| setCaseSensitive | back to summary |
|---|---|
| public void setCaseSensitive(boolean caseSensitive) Configure whether path pattern matching should be case-sensitive. The default is | |
| setMatchOptionalTrailingSeparator | back to summary |
|---|---|
| public void setMatchOptionalTrailingSeparator(boolean matchOptionalTrailingSeparator)
Deprecated since 6.0. transparent support for trailing slashes is deprecated as of 6.0 in favor of configuring explicit redirects through a proxy, Servlet/web filter, or a controller. Configure whether a If set to The default was changed in 6.0 from
| |
| setPathOptions | back to summary |
|---|---|
| public void setPathOptions(PathContainer. Set options for parsing patterns. These should be the same as the options used to parse input paths.
| |