tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: Validation of the server.xml
Date Fri, 01 Aug 2003 16:15:22 GMT


On Fri, 1 Aug 2003, Sabine Winkler wrote:

> Date: Fri, 1 Aug 2003 10:15:46 +0200
> From: Sabine Winkler <winkler@oio.de>
> Reply-To: Tomcat Developers List <tomcat-dev@jakarta.apache.org>,
>      winkler@oio.de
> To: tomcat-dev@jakarta.apache.org
> Subject: Validation of the server.xml
>
> hi there,
>
> may be, this isn't really important but why is there no DTD or scheme to
> validate the server.xml ? in combination with the defined DTD for validating
> the mbeans descriptor file this should be a 'nice' feature. so if You are
> interested in developing / using such a scheme I would start to define one.
> Interest ???
>

A complete DTD (and I'm pretty sure even a schema) for server.xml, which
would support the current level of functionality, is not technically
feasible.

The reason for this shows up when you think about what Tomcat does when it
reads one of the XML elements like <Host> or <Context>.  In particular, it
maps all of the attribute names to corresponding property setter methods,
and calls them -- using the attribute values to configure the behavior of
that Tomcat component.  In order to represent this capability in a DTD or
schema, you'd need to include all possible attributes for all possible
implementation classes (even your own custom Valve that provides some
local feature you've installed in the request processing pipeline).

At best, you could limit yourself to the standard implementation classes
that come with Tomcat, but even then your definition of something like
<Valve> would have to include all possible attributes on all the standard
Valve implementations, even though some of those attributes will be
irrelevant to some Valve classes.

>
> sabine

Craig

Mime
View raw message