Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Order significant in deployment descriptor

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have read somewhere that order of elements is significant in deployment descriptor.
Is that information available on net? Can someone please send me a link to that?

Also, where can i go browse the 1.3 related JSP and Servlet specifications?

Thnaks in advance!
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The order of elements sometimes *is* significant in 1.3, but does *not* matter with 1.4.
 
Sekhar Kadiyala
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you, Kathy.

Would it be fair, if i assume that the web-app element definition thats given in dtd contains the order?

<!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*)>

Can we assume this order?
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sekhar Kadiyala:
Thank you, Kathy.

Would it be fair, if i assume that the web-app element definition thats given in dtd contains the order?

<!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*)>

Can we assume this order?




The order defined in DTD should be taken into consideration. Becoz thats a basic XML rule. The order in which the elements appear in the ELEMENT TAG should be obeyed by the xml documents uses that DTD for validation.

Kathy can you give reason for the order applied in 1.3 and not in 1.4.

IF web.xml of scwcd 1.4 follows a specific dtd. It has to follow the xml rules correct ?

Thanks,

RAMA.
 
author
Posts: 199
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Lakshmi Rama:

The order defined in DTD should be taken into consideration. Becoz thats a basic XML rule. The order in which the elements appear in the ELEMENT TAG should be obeyed by the xml documents uses that DTD for validation.

This statement is true about an XML file using a DTD for validation, but this is not necessarily true for an XML file that uses a Schema for validation.

Kathy can you give reason for the order applied in 1.3 and not in 1.4.

The web-app XML structure in servlet v2.4 (J2EE v1.4) uses a Schema in which the order of the elements is not validated. Therefore, the XML parsers for the DD do not validate order.
[/QB]



HTH,
Bryan
 
Lakshmi Rama
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bryan Basham:


HTH,
Bryan



Thank you Bryan...

Your answers definitely helped me understand the difference better.

 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In Servlet 2.3, the scheme is defined using DTD, which is order dependent.

In Servlet 2.4, the scheme is defined using XSD, which is order independent.

Nick
 
You know it is dark times when the trees riot. I think this tiny ad is their leader:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic