Q18 - Filter Dispatching 
Consider the following <filter-mapping> element in the Deployment Descriptor:
a. This filter-mapping is valid and the "NullHaus Filter" will be accessed each time a request is made to the web application,
b. This filter-mapping is valid and the "NullHaus Filter" will be accessed only if the request is made to the web application root context (/)
c. This filter-mapping is valid and the "NullHaus Filter" will be accessed each time a request is dispatched from a RequestDispatcher obtained either by name or path
d . This filter-mapping is invalid
answer : a
Explanation: The wildcard matches all requests made to the web application. The filter mapping configuration lacks the <dispatcher>...</dispatcher> element, so RequestDispatcher operations will not pass the filter.
One note I want to add :
In this explanation, the filter mapping does not have <dispatcher>. It means the same as <dispatcher>REQUEST</dispatcher> by default, any request.getRequestDispatcher.forward(\*) or request.getRequestDispatcher.include(\*) will not pass a filter.
A teeny tiny vulgar attempt to get you to buy our stuff
Devious Experiments for a Truly Passive Greenhouse!