Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web deployment description problem (DTD)

 
Michael Santosa
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. It seems I have to memorize a lot of things again... :*
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic