This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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

JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt about lister/listner-class" Watch "Doubt about lister/listner-class" New topic

Doubt about lister/listner-class

Frank Jacobsen
Ranch Hand

Joined: May 17, 2002
Posts: 358
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:

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: 358

Have you checked out Aspose?
subject: Doubt about lister/listner-class
It's not a secret anymore!