You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2001/10/29 19:30:32 UTC

DO NOT REPLY [Bug 4450] - Warn if incorrect DTD referenced

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4450>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4450

Warn if incorrect DTD referenced





------- Additional Comments From craig.mcclanahan@sun.com  2001-10-29 10:30 -------
This behavior is actually an artifact of how XML parsers process DOCTYPE
entities.

Basically, the parser calls resolveEntity() on the PUBLIC identifier (the part
that starts "-//Sun ...").  If a local copy of the DTD cannot be found, then and
only then does it try to use the SYSTEM identifier (the http://... part) to look
up the DTD.

Tomcat registers a local copy of all the DTDs it uses, so it will always find
the internal copy -- among other things, this means that you can run Tomcat on a
machine disconnected from the Internet.  It also makes things start up faster,
even on a network-connected machine, because no retrieval of the DTD is
required.

Right now, Tomcat doesn't ever read the web.xml file itself -- it simply asks
the XML parser to read it.  Adding a warning message as you suggest would
require an extra pass through the file at startup time to produce the message --
is it really worth slowing down application startup for this?  I'm inclined to
say no, so I'm marking this as a "WONTFIX".  Feel free to reopen it if you feel
strongly that Tomcat should be able to do this for you.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>