public class RedirectRegexRule extends RegexRule
_handling, _terminating
Constructor and Description |
---|
RedirectRegexRule() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
apply(java.lang.String target,
HttpServletRequest request,
HttpServletResponse response,
java.util.regex.Matcher matcher)
Apply this rule to the request/response pair.
|
void |
setReplacement(java.lang.String replacement)
Whenever a match is found, it replaces with this value.
|
getRegex, matchAndApply, setRegex, toString
isHandling, isTerminating, setHandling, setTerminating
public void setReplacement(java.lang.String replacement)
replacement
- the replacement string.protected java.lang.String apply(java.lang.String target, HttpServletRequest request, HttpServletResponse response, java.util.regex.Matcher matcher) throws java.io.IOException
RegexRule
RegexRule.matchAndApply(String, HttpServletRequest, HttpServletResponse)
if the regex matches.apply
in class RegexRule
target
- field to attempt matchrequest
- request objectresponse
- response objectmatcher
- The Regex matcher that matched the request (with capture groups available for replacement).java.io.IOException
- exceptions dealing with operating on request or response objectsCopyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.