Exam 1z0-900 All QuestionsBrowse all questions from this exam
Question 45

You created two filters for your web application by using the @WebFilter annotation, one for authorization and the other for narrowing results by the provided search criteria. The authorization filter must be invoked first.

How can you specify this?

    Correct Answer: B

    To ensure that the authorization filter is invoked before the filter that narrows results by the provided search criteria, you need to place the filter mapping elements in the required order in the web.xml deployment descriptor. This is because the order in which filters are defined in the web.xml file determines their execution order.

Discussion
pedrolimaOption: B

Correct answer is B. https://stackoverflow.com/questions/6560969/how-to-define-servlet-filter-order-of-execution-using-annotations-in-war

devmsalehOption: B

Correct answer is B

orjavaOption: B

Answer B. You can only define the order of filters in the chain using web.xml file.