Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Registration of Listeners in the DD

 
Ashwini Hegde
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Can anyone please clarify which listeners need registration in the DD (declaring <listener> element in DD)? HFSJ mentions that HttpSessionBindingListeners do not need registration whereas the other 3 HttpSession-related listeners do require to be registered in the DD. What about the other 4 listeners (2 related to HttpServletRequest and 2 related to ServletContext)? DO they need registration?
 
Mukesh Mittal
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you have to register other listeners
 
Prabhu Venkatachalam
Ranch Hand
Posts: 502
Java jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
absolutely yes. except javax.servlet.http.HttpSessionBindingListener, you need register all the 7 listeners in web.xml.
 
Marcus Green
arch rival
Rancher
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do need to register HttpSessionActivationListener in the deployment descriptor?
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpSessionBindingListener and HttpSessionActivationListener are not required to register in DD.Rest you have to register.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://faq.javaranch.com/view?DeclaringListeners
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
there is an ERRATA regarding this section in the book HFSJ.
You do not need to declare the HttpSessionBindingListener and HttpSessionActivationListener listeners.

The word is DECLARE, not REGISTER.
 
Sreeraj G Harilal
Ranch Hand
Posts: 310
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually who is correct?
 
Sayak Banerjee
Ranch Hand
Posts: 292
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What Celinio said is correct....thats confirmed in the faq as well
[ December 15, 2006: Message edited by: Sayak Banerjee ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic