You can add a listener to a web application deployment descriptor (web.xml) in two ways:
The listener element defines a listener in the deployment descriptor. Listener class instances are scoped to one listener per deployment descriptor declaration per Java virtual machine.
For more information about listeners, see the Java Servlet Specification available at
.