This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Web deployment description problem (DTD) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Web deployment description problem (DTD)" Watch "Web deployment description problem (DTD)" New topic
Author

Web deployment description problem (DTD)

Michael Santosa
Greenhorn

Joined: Mar 13, 2002
Posts: 19
Dear Ranchers,
The DTD of web-resource-collection is :
(web-resource-name, description?, url-pattern*,
http-method*)
I have an example :
<web-resource-collection>
<web-resource-name>Name</web-resource-name>
<url-pattern>/servlet/*</url-pattern>
<description>No Description</description>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
Unfortunaly, this sample doesn't work with
Tomcat 4.0..
but this is working fine :
<web-resource-collection>
<web-resource-name>Name</web-resource-name>
<description>No Description</description>
<url-pattern>/servlet/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
The different is only the location of description
tag, that must be written after (web-resource-name).
So it means that we have to be carefull about
the location of each tag ??
Thank you..
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
Yes. Although most application servers are very lenient, an XML file is order sensitive and the DTD does impose the order in which the elements must appear. The exam may well contain questions about this.
- Peter
Michael Santosa
Greenhorn

Joined: Mar 13, 2002
Posts: 19
Thanks for the reply. It seems I have to memorize a lot of things again... :*
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web deployment description problem (DTD)