@Tejas: Filter is suitable if one wants to modify/filter request based on some conditions. Servlet is useful when you want to control, preprocess and/or postprocess requests.
Filter is useful for following scenarios :
1)Query the request and act accordingly.
2)Block the request-and-response pair from passing any further.
3)Modify the request headers and data. You do this by providing a customized version of the request.
4)Modify the response headers and data. You do this by providing a customized version of the response.
5)Interact with external resources.
And for more information about filter, check following link : http://www.oracle.com/technetwork/java/filters-137243.html
And one more thing, every component is defined for certain purpose and we cannot mix purpose of two component. In java, servlet is base for everything in JEE and one can do whatever one wants using servlet.