Hi, Is it necessary that the <listener> element in the DD needs to appear before any of the <servlet> elements for the container to properly instantiate the listener classes first? I read this is a question but HFSJ does not mention anything like this.
The above entry in the Deployment Descriptor(DD) will result in which of the following?
1. Create a listener as defined by the com.javaranch.LogListener class. 2. Provide a Log Servlet for the entire application. 3. The webapp will not be loaded due to a parse exception of the DD. 4. Log all session information as they occur.
I had marked "1" as the answer, assuming "servlet-mapping" would be there. That's the reason I went wrong. The result is "3".