Multiple choice technology web technology

Out of the following, which interface, would one have to implement to implement an intercepting filter?

  1. Javax.servlet.Filter

  2. Javax.servlet.FilterChain

  3. Javax.servlet.FilterConfig

  4. None of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The Intercepting Filter pattern in Java EE is implemented by implementing the javax.servlet.Filter interface. This interface defines methods like init(), doFilter(), and destroy() that allow pre/post-processing of requests and responses. FilterChain and FilterConfig are supporting interfaces used by filters but are not the primary interface to implement.