org.apache.catalina.valves
public abstract class RequestFilterValve extends ValveBase
This valve is configured by setting the allow
and/or
deny
properties to a comma-delimited list of regular
expressions (in the syntax supported by the jakarta-regexp library) to
which the appropriate request property will be compared. Evaluation
proceeds as follows:
process()
method.
This Valve may be attached to any Container, depending on the granularity of the filtering you wish to perform.
Version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (Tue, 24 Oct 2006) $
Field Summary | |
---|---|
protected String | allow
The comma-delimited set of allow expressions. |
protected Pattern[] | allows
The set of allow regular expressions we will evaluate. |
protected Pattern[] | denies
The set of deny regular expressions we will evaluate. |
protected String | deny
The comma-delimited set of deny expressions. |
protected static StringManager | sm
The StringManager for this package. |
Method Summary | |
---|---|
String | getAllow()
Return a comma-delimited set of the allow expressions
configured for this Valve, if any; otherwise, return null . |
String | getDeny()
Return a comma-delimited set of the deny expressions
configured for this Valve, if any; otherwise, return null . |
String | getInfo()
Return descriptive information about this Valve implementation. |
abstract void | invoke(Request request, Response response)
Extract the desired request property, and pass it (along with the
specified request and response objects) to the protected
process() method to perform the actual filtering.
|
protected Pattern[] | precalculate(String list)
Return an array of regular expression objects initialized from the
specified argument, which must be null or a comma-delimited
list of regular expression patterns.
|
protected void | process(String property, Request request, Response response)
Perform the filtering that has been configured for this Valve, matching
against the specified request property.
|
void | setAllow(String allow)
Set the comma-delimited set of the allow expressions
configured for this Valve, if any.
|
void | setDeny(String deny)
Set the comma-delimited set of the deny expressions
configured for this Valve, if any.
|
allow
expressions.allow
regular expressions we will evaluate.deny
regular expressions we will evaluate.deny
expressions.allow
expressions
configured for this Valve, if any; otherwise, return null
.deny
expressions
configured for this Valve, if any; otherwise, return null
.process()
method to perform the actual filtering.
This method must be implemented by a concrete subclass.
Parameters: request The servlet request to be processed response The servlet response to be created
Throws: IOException if an input/output error occurs ServletException if a servlet error occurs
null
or a comma-delimited
list of regular expression patterns.
Parameters: list The comma-separated list of patterns
Throws: IllegalArgumentException if one of the patterns has invalid syntax
Parameters: property The request property on which to filter request The servlet request to be processed response The servlet response to be processed
Throws: IOException if an input/output error occurs ServletException if a servlet error occurs
allow
expressions
configured for this Valve, if any.
Parameters: allow The new set of allow expressions
deny
expressions
configured for this Valve, if any.
Parameters: deny The new set of deny expressions