public class RewritePatternRule extends PatternRule implements Rule.ApplyURI
PathMap
path with a fixed string.Rule.ApplyURI
_pattern
_handling, _terminating
Constructor and Description |
---|
RewritePatternRule() |
Modifier and Type | Method and Description |
---|---|
String |
apply(String target,
HttpServletRequest request,
HttpServletResponse response)
Apply the rule to the request
|
void |
applyURI(Request request,
String oldURI,
String newURI)
This method will add _query to the requests's queryString and also combine it with existing queryStrings in
the request.
|
void |
setReplacement(String replacement)
Whenever a match is found, it replaces with this value.
|
String |
toString()
Returns the replacement string.
|
getPattern, matchAndApply, setPattern
isHandling, isTerminating, setHandling, setTerminating
public void setReplacement(String replacement)
replacement
- the replacement string.public String apply(String target, HttpServletRequest request, HttpServletResponse response) throws IOException
PatternRule
apply
in class PatternRule
target
- field to attempt matchrequest
- request objectresponse
- response objectIOException
- exceptions dealing with operating on request or response objectspublic void applyURI(Request request, String oldURI, String newURI) throws IOException
applyURI
in interface Rule.ApplyURI
request
- oldURI
- newURI
- IOException
public String toString()
toString
in class PatternRule
Copyright © 1995-2015 Webtide. All Rights Reserved.