A trick to remember which listeners to register in the deployment descriptor: Listeners can be classified in 2 categories:

Those that are interested in all events of one type (e.g. HttpSessionListener - interested in ALL HTTP session creation and destruction events, HttpSessionAttributeListener - interested in all session attribute events - any attribute added / removed / replaced), and all the listeners for ServletContext and ServletRequest. The container creates one instance of each of these listeners.

Those that are interested only in specific events of one type. There are 2 listeners of this type :