• Post Reply Bookmark Topic Watch Topic
  • New Topic

Order significant in deployment descriptor  RSS feed

 
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
Rancher
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
Ranch Hand
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!