Does the order of Listeners and
Servlets matter in DD ?
I came across this question (in italics below) on JavaRanch Mock exam and as per it the order does matter. But on Pg 174 of HFSJ, I see a DD with "listener" element after "servlet" element. Any thoughts ??
<web-app>
<servlet>
.....
</servlet>
<listener>
<listener-class>com.javaranch.LogListener</listener-class>
</listener>
</web-app>
The above entry in the Deployment Descriptor(DD) will result in which of the following?
Answer: The webapp will not be loaded due to a parse exception of the DD.
Explanation: The ordering of the DD is listener then servlet.