This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Succeeding with AI and have Veljko Krunic on-line!
See this thread for details.
Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Order significant in deployment descriptor

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
  • 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
 
It means our mission is in jeapordy! Quick, read this tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic