2.8.7 @WebFilter

Organization of this subsection
(1) Description
(2) Attributes

(1) Description

This annotation specifies the filter.

(2) Attributes

The following table lists the @WebFilter attributes:

Attribute NameFunctionality
descriptionThis attribute specifies the filter description.
dispatcherTypesThis attribute specifies the filter adjustment conditions.
displayNameThis attribute specifies the display name.
filterNameThis attribute specifies the filter name.
initParamsThis attribute specifies the initial parameters for filter.
largeIconThis attribute specifies the large icons used on the GUI tool.
servletNamesThis attribute specifies the Servlet name of Servlet that performs mapping.
smallIconThis attribute specifies the small icons used on the GUI tool.
urlPatternsThis attribute specifies the URL patterns to be mapped.
valueThis attribute specifies the URL patterns to be mapped. Ignored if specified concurrently with urlPatterns.

Details of each attribute are as follows:

(a) description attribute
Type
String
Description
This attribute specifies the filter description.
Default Value
""
(b) dispatcherTypes attribute
Type
DispatcherType[]
Description
This attribute specifies the filter adjustment conditions.
Default value
javax.servlet.DispatcherType.REQUEST
(c) displayName attribute
Type
String
Description
This attribute specifies the display name.
Default value
""
(d) filterName attribute
Type
String
Description
This attribute specifies the filter name.
Default value
""
(e) initParams attribute
Type
WebInitParam[]
Description
This attribute specifies the initial parameters for filter.
Default value
{}
(f) largeIcon attribute
Type
String
Description
This attribute specifies the large icons used on the GUI tool.
Default value
""
(g) servletNames attribute
Type
String[]
Description
This attribute specifies the Servlet name of Servlet that performs mapping.
Default value
{}
(h) smallIcon attribute
Type
String
Description
This attribute specifies the small icons used on the GUI tool.
Default value
""
(i) urlPatterns attribute
Type
String[]
Description
This attribute specifies URL patterns to be mapped.
Default Value
{}
(j) value attribute
Type
String[]
Description
This attribute specifies the URL patterns to be mapped. Ignored if specified concurrently with urlPatterns.
Default Value
{}