This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

listener tag in jsp tab library

 
Raj Paul
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody say how listener tag is used in tag library ?? what kind of actions it receives
Thanks
Raj Paul
 
Shawn Bayern
Author
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Raj Paul:
Can anybody say how listener tag is used in tag library ?? what kind of actions it receives
Thanks
Raj Paul

What do you mean by a "listener" tag? Are you speaking of a specific tag library or a general concept?
 
Raj Paul
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use of <listener> element in tag library descriptor file.

Raj Paul
 
chanoch wiggers
Author
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
they can be used to react to session and request level lifecycle events, such as when an attribute is added to the session, or removed from the session. In tags I guess this would translate to changing the behavior of a tag according to whether an attribute has been successfully been added to the request or session level. I havent seen anyone use these to date
 
Raj Paul
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi chanoch
I have tried the events...but nothing is happening ? Anybody tried this in any server. i am using orion server.
Raj Paul
 
Ruilin Yang
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lisening tag is a new feature of the new version of JSP. So in order to test it you should make sure you app server supports the new JSP spec JSP 2.3.
 
Shawn Bayern
Author
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The <listener> element in the JSP 1.2 TLD is useful for registering a Servlet 2.3-style listener on whose behavior a taglib depends. As an example, a tag library might want to ensure that certain values are initialized before running.
 
Raj Paul
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
anybody can give me a URL where i can find examples abt this ?

Thanks & Regards
Raj Paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic