This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
I read in "Head First Servlets and JSP" that if container cant find the right resource for the request, the filter is never invoked. Here by "right resource" do we mean servlet/jsp or even welcome file?
Dynamic web-resource, i.e. Servlet, matched by a servlet name
Static web-resource matched by an URL-pattern
If the filter-mapping doesn't match a servlet name or a static web-resource ( that means the url-pattern doesn't make a match), then the filter is never invoked
If you have a default mapping '/' in the <url-pattern> of a <filter-mapping>, then the filter is never invoked ('/' is only used for the default servlet)
But if you have a mapping of '/*' (meaning all the requests) in the <url-pattern> of a <filter-mapping>, the filter is always invoked, but it can still fail with a "resource unavailable".
Joined: Sep 24, 2009
But I didnt get the term default servlet.
('/' is only used for the default servlet).
Creator of Enthuware JWS+ V6