tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: contextAdmin vs. servlet.xml question
Date Wed, 18 Oct 2000 20:30:53 GMT
Thom Park wrote:

> Craig,
>
> thanks for the succinct answer - I'll take the idea of adding the
> funcitonality under advisement ;-)
> I don't have the time right now but you never know!
>

Volunteers and contributions are always welcome.  This is, after all, an
open
source project.  :-)

>
> One other question - is there a DTD for the server.xml file, either lurking
> in the wings or actually a work
> in progress? I couldn't find one anywhere obvious in the Tomcat source
> tree...
>
> Should we define one, and if so, where should I look to determine all the
> fields etc that belong in there.
>
> I've looked at the comments etc within the server.xml but was wondering if
> there were any other items
> that I need to be mindful of.
>

There is not a DTD for server.xml, and there cannot really ever be a
complete
one.

The reason for this is that the set of properties that are recognized by
the
Java class representing a particular XML element (say, the
org.apache.catalina.core.StandardHost class that is used by default for
<Host>)
is totally up to that class.  If someone wants to plug in their own
implementation of Host, which recognizes some additional properties that
the
standard implementation doesn't recognize.  So you can include something
like
this in server.xml:

    <Host className="org.apache.catalina.MyCoolHostImplementation"
foo="123"
bar="xyz"/>

and the Tomcat startup code will happily create an instance of this
class
(instead of the standard one), then call the setFoo() and setBar()
methods for
you.

DTDs, on the other hand, require that the set of recognized attributes
be
fixed.  For server.xml, the set of all possible attributes is not
knowable.  :-(

What is urgently needed, and is definitely high priority, is
documentation on
what is supported in the standard Tomcat 4.0 classes.  Some effort has
been
expended on this, but it's by no means complete yet.

>
> thanks,
>
> Thom
>

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat

Mime
View raw message