This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Servlets and the fly likes ServletContextAttribute Listener doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ServletContextAttribute Listener doubt" Watch "ServletContextAttribute Listener doubt" New topic
Author

ServletContextAttribute Listener doubt

Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
How to use this interface
ServletContextAttributeListener?

should I include this in the <listener-class> element?
Can I include 2 <listener-class> element inside a single <listener> tag.
Because I also have a ServletContextListener.


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Leandro Melo
Ranch Hand

Joined: Mar 27, 2004
Posts: 401

How to use this interface
ServletContextAttributeListener?


Just implement the interface and configure it in DD.



should I include this in the <listener-class> element?

Yes.



Can I include 2 <listener-class> element inside a single <listener> tag.
Because I also have a ServletContextListener.


No! Create one listener element for each listener you have.
[ August 09, 2005: Message edited by: Leandro Melo ]

Leandro Melo
SCJP 1.4, SCWCD 1.4
 
Consider Paul's rocket mass heater.
 
subject: ServletContextAttribute Listener doubt