tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Bronson" <>
Subject Re: Persistent "xmlValidation" Problem
Date Fri, 04 Nov 2005 04:13:14 GMT
Comments below, for any of you who care....

----- Original Message ----- 
From: "Jeanfrancois Arcand" <>
To: "Tomcat Developers List" <>
Cc: <>
Sent: Tuesday, November 01, 2005 9:11 AM
Subject: Re: Persistent "xmlValidation" Problem

> Hi,
> Bob Bronson wrote:
>> Hello,
>> Sorry, to bother the developer group with this question but I posted 
>> twice on the user group and received zero replies. I was hoping one 
>> of you could offer some quick advice on this question.
>> ---------------------------------
>> I'm using TC 5.5.12.
>> Please look at this snippet from the server.xml that is distributed
>> with TC:
>>  <!-- Define the default virtual host
>>        Note: XML Schema validation will not work with Xerces 2.2.
>>    -->
>>   <Host name="localhost" appBase="webapps"
>>    unpackWARs="true" autoDeploy="true"
>>    xmlValidation="false" xmlNamespaceAware="false">
>> Can anyone tell me what the 'xmlValidation' attribute on <Host> is 
>> for?
>> I realize it has something to do with "XML validation", but what XML 
>> is
>> it referring to? Is it the corresponding web.xml?
> Yes it is.
> And how does the
>> 'xmlNamespaceAware' attribute fit in?
> You can decide to validate with or without namespace.
>> And what's the comment about the Xerces 2.2 parser?
> For a long time, Xerces was broken/buggy when used in Tomcat.
> 'm using Sun's JDK
>> 1.5.0. Does it use Xerces internally?
> Yes it does.

Thanks for the mostly useless reply. I was hoping (silly me) that since
the 'xmlValidation' attribute is completely undocumented
(, one of the
Tomcat programmers could go into more detail about whether it works and
any sublties involved in its use (e.g., any JDK dependecies). Setting
it to 'true' results in a lot of stack traces when validating my simple

Here's something that illustrates the sloppiness of Tomcat programmers:

I installed a fresh copy of TC 5.5.12 (using JDK 1.5.0 on Win XP). I
went into the server.xml that is distributed with TC and changed the
'xmlValidation' attribute value to "true" on the <Host> attribute. What
do you think happened? I got tons of meaningless stack traces. This
tells me one of two things -- either the sloppy Tomcat open sores
programmers released an invalid web.xml that doesn't validate *OR* that
the 'xmlValidation' functionality is broken.

The fact that Tomcat 5.5.12 was released with this very basic (admit
it, it's not a subtle issue) problem indicates to me the poor state of
testing the Tomcat programmers must do at a system level.

>> When I set the 'xmlValidation' attribute to 'true' I get a big stack
>> trace. One would think it might be appropriate to offer a nice error
>> message describing the problem.
> Blame Xerces ;-). XML error are not always easy to discover.

You say that the lousy XML error messages are something I should "blame
on Xerces". That response is a lazy copout which is *SO TYPICAL* of the
arrogant programmers working on open sores projects. I don't blame the
error messages on Xerces, I blame them on lazy, sloppy open sores
Tomcat programmers -- too lazy to test even basic aspects of their
system (like XML validation), too lazy to keep the documentation of
their product up to date, too lazy to GENERATE VALID, MEANINGFUL ERROR
MESSAGES rather than just dumping a stack trace from Xerces, too lazy
to look into any problems that don't interest them. (Hey, they're not
getting paid, why should they bother with things that don't interest
them? -- That seems to be the Open Source Programmer's Manifesto).

>> I've looked at the latest TC documentation for <Host> and it makes 
>> no
>> mention of the 'xmlValidation' attribute:
> That's a problem. I will take a look.
>> Can someone please explain these two attributes? My web.xml is 
>> getting
>> unwieldy and I'd like to start validating it.
> In short, set those two values to true. If you are seeing exception, 
> then it means your web.xml is not properly written. Try using 
> Netbeans/Eclipse (or any IDE). It is much more easy.

Another lazy copout!! Even the web.xml that is distributed w/Tomcat
does not validate! Did you even test this before you replied to my note
or did you just assume the user was at fault???

When someone criticizes the poor state of an open sores project (as I
am doing now), the typical response from the open sores programmer is
to shift responsibility to the user -- the user is often told to dig
through the change logs or browse the forum archives or even to fix the
bug/documentation themselves instead of "complaining". What an
unprofessional, lazy attitude from programmers! The open sores
programmers try to cast *their* laziness as the user's laziness for
"not digging deeply enough" to resolve their own problem, or even
fixing the problem themselves by going into the source code. The fact
that the Tomcat User mailing list often receives over 150 messages a
day is more a testament to Tomcat's crappy documentation than to its

Yes, yes, I know Tomcat is "not for me". You're damned right. I'm happy
to pay money for quality. I guess Tomcat bares out the old adage, "you
get what you pay for".

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

View raw message