• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Order of elements in DD

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
<servlet>
...
</servlet>
<filter>
...
</filter>
<servlet>
...
</servlet>
<filter>
...
</filter>

Thanks,

Wim
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

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,

Sami
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As of the servlet spec 2.4, the elements under web-app can be in an arbitrary order( spec page 106).
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic