Which of the following statements are true?
Choose at least one answer.
A. A filter must extend the HttpFilter class Incorrect
B. A filter must implement the Filter interface Correct
C. Filters are chained to
servlets through the flter tag in the deployment descriptor Correct
D. A filter must be mapped to one and only one servlet Incorrect
E. A filter may be mapped either to a single servlet or to multiple servlets via a URL
pattern Correct
The answers are B, C, and E, but I don't agree with C. I believe the filters are chained to servlets through the "<filter-mapping>", not "<filter>" tag, because <filter> declares a filter, not saying anything about the associated servlet.
Am I being too picky or is the question wrong..? Thanks.