a)unlike servlets,filters cannot have initialization parameters.
b) Filter chain order is always determined by order the elements appear in dd.
c)A class that extends an API request or reponse wrapper class must be declared in dd.
d)A class that extends an API request or response wrapper class is using the Intercepting Filter pattern.
e) Filter chain is afftected by whether filter mappings are declared via <url-pattern> or via <servlet-name>
But i don't understand why it is not B ?
PLease correct me if i am wrong.
FilerManager creates filter chain by matching requested URI. It executes filter one by one unitl it reaches target resource. THis order is determined by the order of the elements appear in DD.
first it locates 1) filters with matching url pattern then 2) it find filter mapping with <servlet-name>
Joined: Jul 10, 2008
Hi Amol, The filter mappings can be defined in DD in 2 ways. One by servlet-name another by url-pattern. In below example 3 filters are defined. 2 are based on URL patterns and 1 with servlet name. Even though the servlet-name filter appears first in the DD, when the container builds the Filter Chain it looks at the URL pattern filter definitions first and then look at the servlet-name filter definitions.