The above entry in the Deployment Descriptor(DD) will result in which of the following?
a. Provide a Log Servlet for the entire application.
b. Create a listener as defined by the com.javaranch.LogListener class.
c. Log all session information as they occur.
d. The webapp will not be loaded due to a parse exception of the DD.
The link you posted is for WebLogic Server, so I suppose that this requirement is specific for this implementation of the container, because I made a quick check in the Servlet specification 2.4. and there it is stated that sub elements in <web-app> tag can be in any order:
SRV.13.2 Rules for Processing the Deployment Descriptor
"The sub elements under web-app can be in an arbitrary order in this version of
Maybe someone else with more experience can confirm that.
I don't have more experience but I have been trying listener examples for WCD preparation, and got no problem with the ordering of <listener> element. I usually put in the same order as given in the question here . I am using Tomcat 7.