@Configurable public class IfQueryParam extends java.lang.Object implements RequestPredicate, CacheablePredicate
<web-app xmlns:resin="urn:java:com.caucho.resin">
<resin:Forbidden regexp="^/local/">
<resin:IfQueryParam name="foo" regexp="bar"/>
</resin:Forbidden>
</web-app>
RequestPredicates may be used for both security and rewrite conditions.
| Constructor and Description |
|---|
IfQueryParam() |
| Modifier and Type | Method and Description |
|---|---|
void |
init() |
boolean |
isMatch(HttpServletRequest request)
True if the predicate matches.
|
void |
setName(java.lang.String name)
Sets the name of the query parameter to test.
|
void |
setRegexp(java.util.regex.Pattern regexp)
Sets the regular expression to compare against the query parameter.
|
void |
setValue(java.util.regex.Pattern regexp) |
@Configurable public void setName(java.lang.String name)
name - the name of the parameter.@Configurable public void setRegexp(java.util.regex.Pattern regexp)
regexp - the regular expression to testpublic void setValue(java.util.regex.Pattern regexp)
@PostConstruct public void init()
public boolean isMatch(HttpServletRequest request)
isMatch in interface CacheablePredicateisMatch in interface RequestPredicaterequest - the servlet request to test