File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Marcus Green's Mock Test 3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Marcus Green Watch "Marcus Green New topic

Marcus Green's Mock Test 3

chandan kumar mitwaa
Ranch Hand

Joined: Jul 01, 2009
Posts: 49

Which of the following statements are true?
Choose at least one answer.
A. A filter must extend the HttpFilter class
B. A filter must implement the Filter interface
C. Filters are chained to servlets through the filter tag in the deployment descriptor
D. A filter must be mapped to one and only one servlet
E. A filter may be mapped either to a single servlet or to multiple servlets via a URL pattern

B. C. E. are the solutions.

I do not understand why C. should be correct? We use <filter-mapping> tag to chain filters to a servlet isn't it???

Someone please clear me on this.

Chandan Kumar
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

You are right. Filter tags do not form a filter chain. filter-mapping tags matching a request pattern do.

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: Marcus Green's Mock Test 3
It's not a secret anymore!