Which of the following statements are true about servlet 3.0?
a. listeners are invoked in a random order.
b. the order in which listeners are invoked can be defined.
c. order can be specified in web.xml or annotation
Given answer: b, c
Prior to this release of the specification, listeners were invoked in a random order. As of servlet 3.0, the order in which listeners are invoked can be defined.
I think the answers should be a , b.
For a, if the listeners are specified by annotation, the order is not specified.
Chapter 8.2.3 of Servlet 3.0, when using annotations to define the listeners, servlets and filters, the order in which they are invoked is unspecified.
For b, the order of the listeners are defined in web.xml.
For c, order cannot be specified by annotation.
So, c is incorrect.