Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Servlets and the fly likes calling a listener class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "calling a listener class" Watch "calling a listener class" New topic
Author

calling a listener class

devika cha
Ranch Hand

Joined: Jun 28, 2004
Posts: 31
i have a class saying MyNewBindingClass which implements HttpSessionBindingListener
now how can i call this class from a servlet?
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
You don't call listeners, the container does. You also must put a <listener> element in your deployment descriptor to tell the container about your listener class.
sarah Marsh
Ranch Hand

Joined: Mar 06, 2001
Posts: 282
When to use listener? Please give me some examples.

Thanks!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: calling a listener class