aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes is sibling elements in web.xml ordered? 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 "is sibling elements in web.xml ordered?" Watch "is sibling elements in web.xml ordered?" New topic
Author

is sibling elements in web.xml ordered?

Yi Meng
Ranch Hand

Joined: May 07, 2003
Posts: 270
e.g. security-role and security-constraint, i saw some web.xml in which security-role comes after security-constraint and some other web.xml in which the order is the other round.


Meng Yi
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1066
Ordering of elements in XML has to be preserved.According to the dtd published on the Sun site, it is always security-constraint followed by security-role.
<!ELEMENT web-app (icon?, display-name?, description?, distributable?,
context-param*, filter*, filter-mapping*, listener*, servlet*,
servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,login-config?, security-role*, env-entry*, ejb-ref*,
ejb-local-ref*)>
web-app_2_3.dtd can be downloaded from http://java.sun.com/dtd/
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is sibling elements in web.xml ordered?