Re: About Question enthuware.jwpv6.2.1225 :
Posted: Tue Jan 22, 2013 12:43 pm
The explanation of this question states that classes implementing HttpSessionActivationListener and HttpSessionBindingListener, are NOT registered as listeners in web.xml
Page 256 of Head First Servlets and JSP 2nd Edition states that only HttpSessionBindingListener is NOT registered in web.xml, and HttpSessionListener and HttpSessionActivationListener are configured in web.xml.
This is confusing.
Can you please, confirm which all listeners need to be configured in web.xml and if possible, why?
1. ServletContextListener - Yes / No ?
2. ServletContextAttributeListener - Yes / No ?
3. ServletRequestListener - Yes / No ?
4. ServletRequestAttributeListener - Yes / No ?
5. HttpSessionListener - Yes / No ?
6. HttpSessionAttributeListener - Yes / No ?
7. HttpSessionBindingListener - Yes / No ?
8. HttpSessionActivationListener - Yes / No ?
Page 256 of Head First Servlets and JSP 2nd Edition states that only HttpSessionBindingListener is NOT registered in web.xml, and HttpSessionListener and HttpSessionActivationListener are configured in web.xml.
This is confusing.
Can you please, confirm which all listeners need to be configured in web.xml and if possible, why?
1. ServletContextListener - Yes / No ?
2. ServletContextAttributeListener - Yes / No ?
3. ServletRequestListener - Yes / No ?
4. ServletRequestAttributeListener - Yes / No ?
5. HttpSessionListener - Yes / No ?
6. HttpSessionAttributeListener - Yes / No ?
7. HttpSessionBindingListener - Yes / No ?
8. HttpSessionActivationListener - Yes / No ?