This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt about lister/listner-class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt about lister/listner-class" Watch "Doubt about lister/listner-class" New topic
Author

Doubt about lister/listner-class

Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 348
Last quistion before the exam tommorow 9:00 CET !

I have seen many exeamples off



But if you have 2 or more listners declared

can you declare it this way:



Or dou yoy have to declare it this way:





Frank
Sayak Banerjee
Ranch Hand

Joined: Nov 28, 2006
Posts: 292
The latter one.


Turn on, tune in, drop out.
Dave Wingate
Ranch Hand

Joined: Mar 26, 2002
Posts: 262
I would think that only the latter wold be valid.

The dtd for web.xml describes the listener element as:


<!ELEMENT listener (listener-class)>



Notice that "listener-class" is not followed by an asterisk or a plus sign, so I think you'd be required to list exactly one listener-class element per listener tag.


Fun programming etcetera!
Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 348
Thanks

Frank
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt about lister/listner-class
 
Similar Threads
About listner entry in the DD???
Number of Instances
Problem with ServletContextListener
Javascript question
database connection in init() of servlet