You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Sabine Winkler <wi...@oio.de> on 2003/08/01 10:15:46 UTC

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 ???


sabine


Re: Validation of the server.xml

Posted by Tim Funk <fu...@joedog.org>.
I'm not interested, here's why:

http://jakarta.apache.org/tomcat/faq/misc.html#dtd

-Tim

Sabine Winkler wrote:
> 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 ???
> 
> 
> sabine
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Validation of the server.xml

Posted by Tim Funk <fu...@joedog.org>.
I'm not interested, here's why:

http://jakarta.apache.org/tomcat/faq/misc.html#dtd

-Tim

Sabine Winkler wrote:
> 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 ???
> 
> 
> sabine
>  


Re: [5.0] Function of o.a.catalina.connector.(Http)Request/ResponseWrapper

Posted by Bill Barker <wb...@wilshire.com>.
----- Original Message ----- 
From: "Remy Maucherat" <re...@apache.org>
To: "Tomcat Developers List" <to...@jakarta.apache.org>
Sent: Saturday, August 02, 2003 10:44 AM
Subject: [5.0] Function of
o.a.catalina.connector.(Http)Request/ResponseWrapper


> Are these four classes useful ? They are not used anywhere (and I
> believe using them will break the pipeline, as some parts now depend on
> the CoyoteRequest/Response).
>
> I'll remove them. Please complain if you want them back for some reason :)
>

I had thought that we had already voted to remove the o.a.c.connector.**
package entirely from TC 5.  I'll repeat my +1 for removing
o.a.c.connector.**.

> Remy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
>


[5.0] Function of o.a.catalina.connector.(Http)Request/ResponseWrapper

Posted by Remy Maucherat <re...@apache.org>.
Are these four classes useful ? They are not used anywhere (and I 
believe using them will break the pipeline, as some parts now depend on 
the CoyoteRequest/Response).

I'll remove them. Please complain if you want them back for some reason :)

Remy


[5.0] Function of o.a.catalina.connector.(Http)Request/ResponseWrapper

Posted by Remy Maucherat <re...@apache.org>.
Are these four classes useful ? They are not used anywhere (and I 
believe using them will break the pipeline, as some parts now depend on 
the CoyoteRequest/Response).

I'll remove them. Please complain if you want them back for some reason :)

Remy


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Validation of the server.xml

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Sat, 2 Aug 2003, Yoko Kamei Harada wrote:

> Date: Sat, 02 Aug 2003 11:23:23 +0900 (JST)
> From: Yoko Kamei Harada <yo...@t3.rim.or.jp>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: tomcat-dev@jakarta.apache.org
> Subject: Re: Validation of the server.xml
>
> From: "Craig R. McClanahan" <cr...@apache.org>
> Subject: Re: Validation of the server.xml
> Date: Fri, 1 Aug 2003 09:15:22 -0700 (PDT)
>
> > On Fri, 1 Aug 2003, Sabine Winkler wrote:
> > > 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.
>
> How about RELAX NG (http://relaxng.org/) ?
> RELAX NG is a schema language for XML.
> RELAX NG has a "include" feature, so RELAX NG allows merging
> plural schemas.
>

How would you specify the rules (even in English) for <Valve>?

The set of attributes recognized by every Valve implementation class in
the world is different.  And the same thing applies to all the other
elements -- the valid set of attributes depends on the implementation
class pointed at with the "className" attribute, or the default one that
is built in as described in the docs.  Validation rules would have to
include the ability to introspect the corresponding Java classes in order
to identify the legal attribute names.

> And the schema compiler for RELAX NG such as JAXB and
> Relaxer(http://www.relaxer.org/) maps the schema to Java classes.
> If tomcat provides some rules for schemas to include, it is easy to get
> Java objects from XML documents.
> The server.xml will be a plugable and valid document.
>

I'm going to remain a skeptic until someone shows me it is possible, by
actually doing it for at least a couple of server.xml elements :-).  Don't
get me wrong -- I agree that such a thing would be useful -- I just don't
think it can be done.

> ---
> HARADA, Yoko

Craig


Re: Validation of the server.xml

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Sat, 2 Aug 2003, Yoko Kamei Harada wrote:

> Date: Sat, 02 Aug 2003 11:23:23 +0900 (JST)
> From: Yoko Kamei Harada <yo...@t3.rim.or.jp>
> Reply-To: Tomcat Developers List <to...@jakarta.apache.org>
> To: tomcat-dev@jakarta.apache.org
> Subject: Re: Validation of the server.xml
>
> From: "Craig R. McClanahan" <cr...@apache.org>
> Subject: Re: Validation of the server.xml
> Date: Fri, 1 Aug 2003 09:15:22 -0700 (PDT)
>
> > On Fri, 1 Aug 2003, Sabine Winkler wrote:
> > > 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.
>
> How about RELAX NG (http://relaxng.org/) ?
> RELAX NG is a schema language for XML.
> RELAX NG has a "include" feature, so RELAX NG allows merging
> plural schemas.
>

How would you specify the rules (even in English) for <Valve>?

The set of attributes recognized by every Valve implementation class in
the world is different.  And the same thing applies to all the other
elements -- the valid set of attributes depends on the implementation
class pointed at with the "className" attribute, or the default one that
is built in as described in the docs.  Validation rules would have to
include the ability to introspect the corresponding Java classes in order
to identify the legal attribute names.

> And the schema compiler for RELAX NG such as JAXB and
> Relaxer(http://www.relaxer.org/) maps the schema to Java classes.
> If tomcat provides some rules for schemas to include, it is easy to get
> Java objects from XML documents.
> The server.xml will be a plugable and valid document.
>

I'm going to remain a skeptic until someone shows me it is possible, by
actually doing it for at least a couple of server.xml elements :-).  Don't
get me wrong -- I agree that such a thing would be useful -- I just don't
think it can be done.

> ---
> HARADA, Yoko

Craig


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Validation of the server.xml

Posted by Yoko Kamei Harada <yo...@t3.rim.or.jp>.
From: "Craig R. McClanahan" <cr...@apache.org>
Subject: Re: Validation of the server.xml
Date: Fri, 1 Aug 2003 09:15:22 -0700 (PDT)

> On Fri, 1 Aug 2003, Sabine Winkler wrote:
> > 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.

How about RELAX NG (http://relaxng.org/) ?
RELAX NG is a schema language for XML.
RELAX NG has a "include" feature, so RELAX NG allows merging
plural schemas.

And the schema compiler for RELAX NG such as JAXB and 
Relaxer(http://www.relaxer.org/) maps the schema to Java classes.
If tomcat provides some rules for schemas to include, it is easy to get 
Java objects from XML documents. 
The server.xml will be a plugable and valid document.

---
HARADA, Yoko

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Validation of the server.xml

Posted by Yoko Kamei Harada <yo...@t3.rim.or.jp>.
From: "Craig R. McClanahan" <cr...@apache.org>
Subject: Re: Validation of the server.xml
Date: Fri, 1 Aug 2003 09:15:22 -0700 (PDT)

> On Fri, 1 Aug 2003, Sabine Winkler wrote:
> > 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.

How about RELAX NG (http://relaxng.org/) ?
RELAX NG is a schema language for XML.
RELAX NG has a "include" feature, so RELAX NG allows merging
plural schemas.

And the schema compiler for RELAX NG such as JAXB and 
Relaxer(http://www.relaxer.org/) maps the schema to Java classes.
If tomcat provides some rules for schemas to include, it is easy to get 
Java objects from XML documents. 
The server.xml will be a plugable and valid document.

---
HARADA, Yoko

Re: Validation of the server.xml

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 1 Aug 2003, Sabine Winkler wrote:

> Date: Fri, 1 Aug 2003 10:15:46 +0200
> From: Sabine Winkler <wi...@oio.de>
> Reply-To: Tomcat Developers List <to...@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

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: Validation of the server.xml

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 1 Aug 2003, Sabine Winkler wrote:

> Date: Fri, 1 Aug 2003 10:15:46 +0200
> From: Sabine Winkler <wi...@oio.de>
> Reply-To: Tomcat Developers List <to...@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