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 'listner' tag in TLD 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 " Watch " New topic

'listner' tag in TLD

Rajesh Pathak
Ranch Hand

Joined: Aug 15, 2002
Posts: 56
In the tag library Descriptor file, there is a optional 'listner' tag. Which listner class is to be mentioned here? I mean, how which type of event notifications we get from this?
please help.

Rajesh(Bangalore,India)<br />SCJP2, SCWCD, SCEA, IBM-XML, UML-OOAD, IBM-Enterprise Connectivity with J2EE.
Maha Annadurai
Ranch Hand

Joined: Oct 27, 2002
Posts: 87
The <listener> element in .tld file will have any one of the following 4 application event listeners.
From Jsp 1.2 Spec:
JSP. Event Listeners
A tag library may include classes that are event listeners (see the Servlet 2.3
specification). The listeners classes are listed in the tag library descriptor and the
JSP container automatically instantiates them and registers them. A container is
required to locate all TLD files (see Section JSP.7.3.1 for details on how they are
identified), read their listener elements, and treat the event listeners as extensions of
those listed in web.xml.
The order in which the listeners are registered is undefined, but they are
registered before application start.
Here is a good working example from Marty Hall's 'More Servlets' book.
Maha Anna
[ December 01, 2002: Message edited by: Maha Annadurai ]
I agree. Here's the link:
subject: 'listner' tag in TLD
It's not a secret anymore!