Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

listener tag in DD

 
Deb Sadhukhan
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the order of listener and servlet tags matters in DD?

eg. is the following invalid?

 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes the order is necessary. <listener> element precedes the <servlet> element.
 
Jose Esteban
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic