Com.lwl.anno Gaze type @WebFilterSort
Required Jar Package http://download.csdn.net/detail/u013202238/9431110
The filter with this note is loaded by default in the deployment descriptor, and can be used to change the load order using Ismatchafter
Sort the note for filter, sort starting from 1, 1 highest priority
First run with Url-pattern filtering, servlet-name filtered after all Url-pattern run
setting parameters in Web. xml
< context-param>
< description> the filter to be scanned in the package </description>
< param-name>filterpackage</param-name>
< param-value>com.test.filter.pack</param-value>
</context-param>
Filterpackage required, the smaller the package, the better
Filterinitscanjar Select Fill
Whether to scan the class in the jar package, default feel false does not scan, assuming that does not print can not configure the parameter
Filterinitdebug Select Fill
Whether to print filter initialization information (in sort order), by default false does not print, assuming that the parameter is not printed and can not be configured
-
- Summary of required elements
Required Elements
Qualifiers and Types |
required elements and descriptions |
int |
value Sort priority |
- Optional element Overview
optional elements
Qualifiers and Types |
optional elements and descriptions |
boolean |
asyncSupported Declares whether the filter supports asynchronous operation mode. |
DispatcherType[] |
dispatcherTypes The dispatcher types to which the filter applies default {dispatchertype.request}; |
java.lang.String |
displayName The display name of the Filter,default "" |
java.lang.String |
filterName The name of the Filter,default "" |
boolean |
isMatchAfter Indicates the order of the filter relative to the filter in the deployment descriptive descriptor Assuming that the parameter used is false, the filter mapping will be loaded before all the filters in the description described in the deployment descriptor are loaded, If True (the default), then the filter in the deployment descriptor will be loaded first |
java.lang.String[] |
servletNames The names of the Servlets to which the filter applies. |
java.lang.String[] |
urlPatterns The URL patterns to which the filter applies,default {"/*"} |
-
- Element Specific Information
Javaweb define sortable filter annotations to solve Servlet3.0 @webfilter annotations cannot be sorted.