How are Interceptors and Servlet Filters different?

Answer

1. Filters are part of the Servlet API, Interceptors are Struts 2.
2. The Interceptor stack fires on requests in a configured package while filters only apply to their mapped URLs.
3. Interceptors can be configured to execute or not depending on specific target action methods via excludeMethods and includeMethods while Filters lack this feature.
4. Filters are an implementation of the Intercepting Filter pattern while Interceptors are of the Interceptor pattern.

All struts2 Questions

Ask your interview questions on struts2

Write Your comment or Questions if you want the answers on struts2 from struts2 Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---