• Post Reply Bookmark Topic Watch Topic
  • New Topic

Listeners not to be configured in DD  RSS feed

 
Salil Dhawan
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Head First Servlets and JSP 1.4 on P-254,its mentioned that you don't need to configure session Binding listeners in DD but got to configure all other listeners except this in DD

I was going through whiz labs Mock questions and they have HttpSessionActivation Listener also in list besides HttpSessionBindingListeners???

I think Head First version is right but still want to confirm.Please let me know

-Salil
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Head First book is correct. The HttpSessionBindingListener interface is implemented by objects that are stored as session attributes and do not require registration of an event listener in web.xml. Whenever an object is added to or removed from a session, the servlet container introspects the object's implemented interfaces. If HttpSessionBindingListener is implemented, the container will invoke valueBound or valueUnbound.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!