File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: how to register the listeners
It's not a secret anymore!