| What is Servlet Filter and its usage
As we know filter is an object that is usally happened at the time of pre and post processing of request. And there are many task which are performed by filter such as logging, compression, encryption, conversion and decryption and input validation etc.
The servlet filter is pluggable and usaully we will defined entry in web.xml files. If we remove that entry then filter will automatically removed and we donot need to change the servlet.
Usage of Filter
(1)It will records all incoming requests
(2)Will helps in conversion
(3)It will logs the IP Addresses of computers which make the requests
(4)It helps in data compression
(5)It helps in encryption and decryption
(6)Its helps in validation of user input | | |