您的位置:首页 > 其它

Servlet3.0新特性WebFilter(Annotation Filter)详解

2017-09-14 10:49 507 查看
摘要:

Servlet3.0作为J2EE 6规范一部分,并随J2EE6一起发布,WeFilter是过滤器注解,是Servlet3.0的新特性,不需要在web.xml进行配置,简化了配置。

Name

Type

Required

Description

filterName

String

Optional

Name of the filter.

value

or

urlPatterns

String[]

Required

Specify one or more URL patterns to which the filter applies. Either of attribute can be used, but not both.

dispatcherTypes

DispatcherType[]

Optional

Specify types of dispatcher to which the filter applies. Default isjavax.servlet.DispatcherType.REQUEST

servletNames

String[]

Optional

Specify names of servlets to which the filter applies.

displayName

String

Optional

Display name of the filter.

description

String

Optional

Description of the filter.

asyncSupported

boolean

Optional

Specify whether the filter supports asynchronous operation mode. Default is false.

initParams

WebInitParam[]

Optional

Specify one or more initialization parameters of the filter. Each parameter is specified by@WebInitParamannotation type.

smallIcon

String

Optional

Specify name of the small icon of the filter.

largeIcon

String

Optional

Specify name of the large icon of the filter.

OneFilter:

TwoFilter:

ThreeFilter:

FourFilter:

FiveFilter:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: