1. I would agree with Carl.
Following is the quote from section "SRV.13.2 - Rules for Processing the Deployment Descriptor" in "Chapter SRV.13 - Deployment Descriptor" of
Java Servlet Specification Version 2.3
"It is recommended, but not required, that web containers and tools validate deployment descriptors against DTD document for structural correctness."
This supports Carl's statement -
"No, Sun doesn't specify"
2. I would like to rectify Chintan's statement -
"My observation about Sun's dtd is that it lists all the tags alphavetically and that is why <listener> comes before <servlet>"
No, in Sun's DTD, as in servlet 2.3 spec, tags are not listed alphabetically.
If you observe DTD carefully
a) security-role comes before env-entry
b) icon comes before display-name
c)distributable comes before context-param
Hope this helps
------------------
Harpreet S Hira
Sun Certified Java2 Programmer