Google News
logo
Java Servlets - Interview Questions
Why do we need Servlet Filter?
We need Servlet Filters for the following reasons :
 
* Logging the request parameters to log files.
* Authentication and Authorization of the request for the needed resources.
* Formatting of the request body/header before sending it to the servlet.
* Compressing response data sent to the client.
* Change the response by adding some cookies and header information.
Advertisement