When a request is processed through multiple filters, how is the order of execution determined in a servlet application?

  • The order is determined alphabetically based on filter names.
  • The order is determined by the order in the web.xml file.
  • The order is determined by the order in which filters are added programmatically in the servlet code.
  • The order is determined randomly at runtime.
The order of execution of filters is determined by the order in which they are declared in the deployment descriptor (web.xml) file. The filters are applied to the request and response objects in the order specified in the deployment descriptor.
Add your answer
Loading...

Leave a comment

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