Paolo Barolat-Romana wrote:
> This is the top of the web.xml file in the conf directory:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Appliction
> 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
>
> As far as I know, the xml parser will look for the dtd and verify that the
> xml file conforms to the description in the dtd.
>
You must also tell the XML parser to do a "validating" parse if you want
this. Otherwise, an non-validating parse is performed. For example, Tomcat
3.x does not do a validating parse of web.xml files, but Tomcat 4.0 does.
>
> Why doesn't the server.xml has such a declaration at the top? Would that
> make an xml parser fail?
>
No, it just means that you get a non-validating parse anyway. For various
technical reasons (i.e. DTDs are not powerful enough), it is not possible to
create a DTD that completely describes the legal contents of a server.xml
file.
>
> Thanks,
>
> Paolo
>
Craig McClanahan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]