This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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.