public class RedirectPatternRule extends PatternRule
All redirects are part of the 3xx Redirection status code set.
Defaults to 302 Found
Rule.ApplyURI_pattern_handling, _terminating| Constructor and Description |
|---|
RedirectPatternRule() |
| Modifier and Type | Method and Description |
|---|---|
String |
apply(String target,
HttpServletRequest request,
HttpServletResponse response)
Apply the rule to the request
|
void |
setLocation(String value)
Sets the redirect location.
|
void |
setStatusCode(int statusCode)
Sets the redirect status code.
|
String |
toString()
Returns the redirect status code and location.
|
getPattern, matchAndApply, setPatternisHandling, isTerminating, setHandling, setTerminatingpublic void setLocation(String value)
value - the location to redirect.public void setStatusCode(int statusCode)
statusCode - the 3xx redirect status codepublic String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
PatternRuleapply in class PatternRuletarget - field to attempt matchrequest - request objectresponse - response objectIOException - exceptions dealing with operating on request or response objectspublic String toString()
toString in class PatternRuleCopyright © 1995-2016 Webtide. All Rights Reserved.