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

is sibling elements in web.xml ordered?

 
Yi Meng
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic