@Configurable public class IfHeader extends java.lang.Object implements RequestPredicate
<web-app xmlns:resin="urn:java:com.caucho.resin"> <resin:Forbidden regexp="^/local/"> <resin:IfHeader name="foo" regexp="bar"/> </resin:Forbidden> </web-app>
RequestPredicates may be used for both security and rewrite conditions.
Constructor and Description |
---|
IfHeader() |
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 HTTP header name to test.
|
void |
setRegexp(java.util.regex.Pattern regexp)
Sets the HTTP header regexp to compare against.
|
void |
setValue(java.util.regex.Pattern regexp) |
@Configurable public void setName(java.lang.String name)
@Configurable public void setRegexp(java.util.regex.Pattern regexp)
public void setValue(java.util.regex.Pattern regexp)
@PostConstruct public void init()
public boolean isMatch(HttpServletRequest request)
isMatch
in interface RequestPredicate
request
- the servlet request to test