Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DD elements

 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the order of elements in DD important?I guess it was there only for servlet 2.3.Please let me know
 
shivender Devarakonda
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe as long as your order did not break any rules(DTD or schema defined in specs or used by your app server) it should not be a problem......

-
Shivender
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The order is not relevant anymore in servlet 2.4. Meaning that you won't get any xml parsing errors for that.
However, some tags are used according to the order in which they are declared in the deployment descriptor. That's when the order as some significance. I can think of the way filters are used, or the way listeners are instanciated.
[ July 01, 2007: Message edited by: Satou kurinosuke ]
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The order does matter with the 2.3 specs of servlets. But as Satou pointed out , the order of the inner elements like for filters, listeners does matter.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The order is not relevant anymore in servlet 2.4. But this is true only for the top elements which are come under directly web-app elements. For other sub-elements the order is still important.

You can place <servlet> <filter> <listener> element in any order in the web.xml. But , for example, the subelements of <servlet> element must be in order.

Though for some containers like tomcat, it is not error, by the servlet 2.4 specification the sub-elements must be in order.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic