wood burning stoves 2.0
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes how to register the listeners Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "how to register the listeners" Watch "how to register the listeners" New topic

how to register the listeners

narendra darlanka
Ranch Hand

Joined: Jun 17, 2005
Posts: 66
i read that we can register ServletContextListener by using the deployment descriptor.but how do i register other listeners like HttpSessionListener ,HttpRequestListener?

thanks inadvance

~naren<br /> scjp1.4<br /> scwcd1.4
Sergey Tyulkin
Ranch Hand

Joined: May 10, 2005
Posts: 87
the same way:
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
All listeners are registed through the web.xml
listeners tag. They are automatically used appropriately (probably using instanceof ).

SCJP 1.4
It is sorta covered in the JavaRanch Style Guide.
subject: how to register the listeners
jQuery in Action, 3rd edition