wood burning stoves 2.0*
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
 
Don't get me started about those stupid light bulbs.
 
subject: Doubt about lister/listner-class