File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Order of elements in DD Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Order of elements in DD" Watch "Order of elements in DD" New topic

Order of elements in DD

Wim van Haaren

Joined: Nov 04, 2004
Posts: 18
The DTD for web.xml version 2.3 clearly defines the order in which the elements must occur. The schema for version 2.4, however, now defines the sub-elements of <web-app> through a choice, which means that the ordering of the sub-elements has been let go of in the new version.

Am I correct to assume that (for the 1.4 exam) the order of sub-elements of <web-app> are arbitrary and that therefore for example <servlet> can occur before <filter>? Or even something like


Sami Sayeed
Ranch Hand

Joined: Oct 05, 2004
Posts: 39

Look at the XSD,

If the XSD is using a <xsd:sequence> construct to declare the lements one must follow the sequence if, there are no xsd:sequence you are free to use the elements without any order,

Omar Dziri

Joined: Oct 06, 2004
Posts: 20
As of the servlet spec 2.4, the elements under web-app can be in an arbitrary order( spec page 106).

Master degree in computer systems,<br />SCJP 1.4,<br />SCBCD 1.3,<br />SCWCD 1.4,<br />SCDJWS(in progress)
I agree. Here's the link:
subject: Order of elements in DD
Similar Threads
DD elements
About listner entry in the DD???
Regarding order of elements
Ordering of elements in DD
Specification versions for SCWCD