|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.rewrite.IfCookie
@Configurable public class IfCookie
Passes if the named HTTP cookie exists and has a value that matches a regular expression.
<web-app xmlns:resin="urn:java:com.caucho.resin">
<resin:Forbidden regexp="^/local/">
<resin:IfCookie name="foo" regexp="bar"/>
</resin:Forbidden>
</web-app>
RequestPredicates may be used for both security and rewrite conditions.
| Constructor Summary | |
|---|---|
IfCookie()
|
|
| Method Summary | |
|---|---|
void |
init()
|
boolean |
isMatch(HttpServletRequest request)
True if the predicate matches. |
void |
setName(java.lang.String name)
Sets the HTTP cookie name to test. |
void |
setRegexp(java.util.regex.Pattern regexp)
Sets a regexp to compare against the cookie value. |
void |
setValue(java.util.regex.Pattern regexp)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IfCookie()
| Method Detail |
|---|
@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 RequestPredicaterequest - the servlet request to test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||