jQuery in Action, 3rd edition
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes listener tag in DD 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 "listener tag in DD" Watch "listener tag in DD" New topic
Author

listener tag in DD

Deb Sadhukhan
Ranch Hand

Joined: Nov 05, 2003
Posts: 67
Is the order of listener and servlet tags matters in DD?

eg. is the following invalid?



_ __ _ __ _ __ _<br />SCJP 1.4 (95%) | SCWCD 1.4 (79%)<br />Artificial intelligence is no match for natural stupidity.
Bassam Zahid
Ranch Hand

Joined: Mar 09, 2005
Posts: 61
Yes the order is necessary. <listener> element precedes the <servlet> element.


BS<br />SCJP 1.4 88%<br />SCWCD 1.4 86%
Jose Esteban
Ranch Hand

Joined: Nov 28, 2004
Posts: 102
Originally posted by Bassam Zahid:
Yes the order is necessary. <listener> element precedes the <servlet> element.


Sorry Bassam, but I don't agree. According to Servlet spec 2.4, SRV.13.4:
"1. web-app Element
...
All sub elements under this element can be in an arbitrary order."

So the order doesn't matter under <web-app>
Ganeshji Marwaha
Greenhorn

Joined: Sep 16, 2004
Posts: 27
Originally posted by Jose Esteban:


Sorry Bassam, but I don't agree. According to Servlet spec 2.4, SRV.13.4:
"1. web-app Element
...
All sub elements under this element can be in an arbitrary order."

So the order doesn't matter under <web-app>


I agree with u Jose... I guess, this order thing has been made lenient starting from servlet spec 2.4. so, we can have elements within in any arbitary order... unless, u know that the order matters to u... like in the case of ordering of filter DD elements...


-- Ganeshji Marwaha<br />SCJP<br />SCWCD<br />SCBCD<br />MCP, MCP+SB, MCSD
Bassam Zahid
Ranch Hand

Joined: Mar 09, 2005
Posts: 61
Thanks Jose Esteban for indicating the error. It is really astonishing to know that order is not necessary. I think till Servlet 2.3 it was necessary. Am I right?
James Christian
Ranch Hand

Joined: Apr 04, 2005
Posts: 63
HFS on page 174 shows example of listener tag at the end of the DD so it seems that Jose's the man. Order is not important.
 
Have you checked out Aspose?
 
subject: listener tag in DD
 
It's not a secret anymore!