org.eclipse.jetty.rewrite.handler
Class LegacyRule
java.lang.Object
org.eclipse.jetty.rewrite.handler.Rule
org.eclipse.jetty.rewrite.handler.LegacyRule
public class LegacyRule
- extends Rule
Rule implementing the legacy API of RewriteHandler
LegacyRule
public LegacyRule()
matchAndApply
public String matchAndApply(String target,
HttpServletRequest request,
HttpServletResponse response)
throws IOException
- Description copied from class:
Rule
- This method calls tests the rule against the request/response pair and if the Rule
applies, then the rule's action is triggered.
- Specified by:
matchAndApply
in class Rule
- Parameters:
target
- The target of the request
- Returns:
- The new target if the rule has matched, else null
- Throws:
IOException
- TODO
getRewrite
public PathMap getRewrite()
- Returns the map of rewriting rules.
- Returns:
- A
PathMap
of the rewriting rules.
setRewrite
public void setRewrite(PathMap rewrite)
- Sets the map of rewriting rules.
- Parameters:
rewrite
- A PathMap
of the rewriting rules. Only
prefix paths should be included.
addRewriteRule
public void addRewriteRule(String pattern,
String prefix)
- Add a path rewriting rule
- Parameters:
pattern
- The path pattern to match. The pattern must start with / and may use
a trailing /* as a wildcard.prefix
- The path prefix which will replace the matching part of the path.
Copyright © 1995-2011 Mort Bay Consulting. All Rights Reserved.