Filters can be used to transform the response from a servlet or a JSP page and can perform many functions as followsUser Authentication- Blocking requests based on user identity.Logging and auditing-Tracking users and the actions performed.Image conversion- Scaling, squeezing etcData compression-For making the download easier.Localization-Targeting the request and response to a particular locale.A filter is a Java class which implements the javax.servlet.Filter interface . The javax.servlet.Filter interface defines three methods as given below.