@Immutable public class PathPatternRequestMatcher extends Object implements RequestMatcher
Constructor and Description |
---|
PathPatternRequestMatcher(Pattern includePattern,
Pattern excludePattern)
Constructor.
|
PathPatternRequestMatcher(String includePattern,
String excludePattern)
Convenience constructor (see
PathPatternRequestMatcher(Pattern, Pattern) }. |
Modifier and Type | Method and Description |
---|---|
static RequestMatcher |
fromFilterConfig(javax.servlet.FilterConfig config)
Builds a
PathPatternRequestMatcher from the given filter configuration. |
boolean |
matches(javax.servlet.ServletRequest req)
Attempts to match the given request.
|
String |
toString() |
public PathPatternRequestMatcher(String includePattern, String excludePattern)
PathPatternRequestMatcher(Pattern, Pattern)
}.public PathPatternRequestMatcher(Pattern includePattern, Pattern excludePattern)
matches(ServletRequest)
logs every path that is matched or rejected, if the log level is DEBUG or lower.includePattern
- a pattern for relative paths to include (pass NULL to include all paths).excludePattern
- a pattern for relative paths to exclude (pass NULL if you don't want to exclude anything).public static RequestMatcher fromFilterConfig(javax.servlet.FilterConfig config)
PathPatternRequestMatcher
from the given filter configuration.
This constructor function looks for init parameters named InitParameterNames.INCLUDE_PATH_PATTERN
and InitParameterNames.EXCLUDE_PATH_PATTERN
in the given FilterConfig
and the ServletContext
.
Values from the given configuration override values from the ServletContext
.
public boolean matches(javax.servlet.ServletRequest req)
RequestMatcher
matches
in interface RequestMatcher
Copyright © 2012-2013. All Rights Reserved.