This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
A programmer is creating a filter for a Java EE web application. Given the following code:
What change(s) are necessary to create a valid filter? (Choose all that apply.)
A. No changes are necessary.
B. A destroy() method must be added.
C. The doFilter() method’s body must be changed.
D. The init() method’s signature must be changed.
E. The doFilter() method’s arguments must be changed.
F. The doFilter() method’s exceptions must be changed.
Book marks B C D and E as correct but as my opinion C is incorrect - filters can block request, make redirects ans dispatches. Call of chain.doFilter() method is not necessary.