If a filter needs to perform different actions based on the type of HTTP request, which method or object should it use to determine this?

  • doFilter()
  • getContentType()
  • getRequestDispatcher()
  • getRequestType()
The doFilter() method in a filter is responsible for performing different actions based on the type of HTTP request. This method is invoked by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *