• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

'listner' tag in TLD

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The <listener> element in .tld file will have any one of the following 4 application event listeners.
HttpSessionListener
HttpSessionAttributeListener
ServletContextListener
ServletContextAttributeListener
From Jsp 1.2 Spec:
-------------------
JSP.7.1.2.2 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.
http://archive.moreservlets.com/Chapter10.html
Regards,
Maha Anna
[ December 01, 2002: Message edited by: Maha Annadurai ]
 
Doody calls. I would really rather that it didn't. Comfort me wise and sterile tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic