Pr.Pg Next Pg

How to define a filter tutorials

  • You can define filter same as servlet. Let’s see below the elements of filter and filter-mapping.

<web-app>

 

<filter>

<filter-name>…</filter-name>

<filter-class>…</filter-name>

</filter>

 

<filter-mapping>

<filter-name>…</filter-name>

<url-pattern>…</url-pattern>

</filter-mapping>

 

</web-app>

Pr.Pg border                                              Next Pg