If a filter needs to perform different actions based on whether the request is an HTTP GET or POST, where should this logic be implemented?

  • In the destroy() method
  • In the doFilter() method
  • In the init() method
  • In the service() method
The logic for different actions based on HTTP GET or POST requests should be implemented in the doFilter() method of the filter. This method is responsible for processing the request and can be customized for different scenarios.
Add your answer
Loading...

Leave a comment

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