tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <>
Subject Re: Why does Tomcat use xerces under java 1.4 instead of the internal jvm classes?
Date Wed, 02 Apr 2003 21:25:07 GMT
Jean-Francois Arcand wrote:

> Costin Manolache wrote:
>>Jean-Francois Arcand wrote:
>>>>At least in tomcat5 I never use xerces - only the bundled parser, and so
>>>>far I've seen no problems.
>>>Crimson is a very good parser, and it still faster that Xerces in some
>>>case. The only reason I see for bundling xerces is for when we turn on
>>>validation & the web.xml used a schema for validation.
>>So why not making the "web.xml validator" a separate download ? If
>>people want to turn on validation, they'll need to get the validator -
>>which will include xerces and some simple script to do the validation.
> That means removing DTD validation from the current implementation? For
> me, seems a feature regression. If we stop validating, we should have a
> very good documentation  in other to avoid confusion and hours or
> debugging.

No, I'm not sugesting to remove DTD validation. 

Just that it hurts people - and without too much gain. 

But it's actually the reverse - the DTD validation is the one that causes
confusion and hours of debugging ( plus slow startup time ). Good software
should be tolerant with the user input. 

A tool that generates the web.xml should be strict and make sure the output 
is valid. A user who wants to be sure the webapp it ships is correct should
validate the web.xml ( against DTD or schema ). A deploy tool could also
validate web.xml and the tlds. 

It is too late to change the behavior for DTD ( for backward compat, etc ),
but at least schema validation can be avoided.

BTW - in the web.xml files that I write I usually remove the declaration on
the top ( to make sure the validation doesn't happen ).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message