What is the need of Servlet filters?

devquora
devquora

Posted On: Feb 22, 2018

 

Servlet filters are pluggable java components that are used to process requests before the requests are sent to the servlets and before a container sends the response back to the client.

Some tasks performed with filters are:

  • Logging request parameters to log files.
  • Authorization of request for services
  • The arrangement of request body and header before sending it to a servlet.
  • Condense the response data sent to client
  • Add cookies, header information etc. In response.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Servlet interview questions

    What do you mean by Servlet?

    It is designed by the Java software company. It is used to extend the ability of the server...

    Servlet interview questions

    Differentiate between the web server and application server?

    Web Server is the connection between the HTTP and HTML...

    Servlet interview questions

    Which HTTP method is said to be non-idempotent and idempotent?

    If any HTTP brings the same result every time then it means it is idempotent...