Name
<filter-mapping>
Synopsis
A filter is mapped to either a URI pattern or a servlet using the
<filter-mapping>
element. The <filter-name>
subelement
identifies the filter using a name defined by a
<filter>
element. A
<url-pattern>
or a
<servlet-name>
defines when the filter shall
be invoked. If a URL mapping is used, the same values as for a
<servlet-mapping>
element can be used. More
than one filter may match a specific request. If so, the container
chains them in the order the matching
<filter-mapping>
elements appear in the
deployment descriptor:
<filter-mapping> <filter-name>accessControl</filter-name> <url-pattern>/protected</url-pattern> </filter-mapping>
Get JavaServer Pages, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.