tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Proposal: use tomcat-version-number in server.xml <Server> element?
Date Fri, 02 Dec 2011 17:35:28 GMT

On 12/2/11 12:26 PM, Filip Hanik - Dev Lists wrote:
> Chris, this would be your [cue] to rethink the solution one step further
> down the line.
> Not too long ago, I add in a property validator. Tomcat used to silently
> ignored invalid attributes, so misspellings such as
> <Server sport="-1" shutdowns="SHUTDOWN">
> This used to run with default values, with zero logging. This has been
> addressed for the most part.
> but there are still [loopholes], particularly with values and elements

Definitely. I'll see if I can take a look at the validator to see how it
might be extended to look for certain things.

I just cringe whenever I see someone who has a <Logger> element in their
server.xml or "debug" attributes all over their elements. The former may
require a different strategy, but the latter should already be handled
by your validator (which really sounds like a complainer :)

Tomcat already uses commons-digester to read its configuration files, so
it should be trivial to add some rules to look for specific, definitely
BAD things (like <Logger> anywhere, for instance).

IIRC, Tomcat has hard-coded digester rules for just about everything.
Does anyone know if that was an intentional design decision or just what
happened at the time? Digester may have more elegant ways of doing the
same things these days (like XML configuration)... and that would make
it easier for me to add something like this: just a one-liner in the
configuration for each known-bad element/property instead of modifying
the code.


View raw message