2017  Kodetalk | Feedback | Privacy Policy | Terms | About
userimage

Why in Struts1.x there is Servlet where as in case of Struts2.x there is Filter

Recently i faced this qtsn in a interview. Can any one help me out.
userimage

We can't differentiate them, both can handle the jobs very effectively,but implementation is different.

Filters allow more flexibility in handling other types of requests (forwards, includes, and container errors) by using the <dispatch> element under <filter> configuration.

Answer is