# 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.

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.