tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: [Catalina] Using XML Parsing Package in "org.apache.tomcat.util.xml"
Date Sun, 13 Feb 2000 07:36:48 GMT wrote:

> > Costin,
> >
> > I'd like to try using the XmlMapper stuff you've built (in package
> > org.apache.tomcat.util.xml) to configure Catalina.  Are the interfaces
> > and functionality stable enough to start using?  In addition, I'll let
> > you know if I would find particular modifications useful.
> It should be good enough, it can read web.xml ( not so easy ).
> You can add new XmlActions if you need (in XMLMapper if generic,
> local in your class if specific to the application ).
> Make any changes you want, and let me know what you think ( I spent a lot
> of time for XmlMapper...)

XmlMapper is quite nice.  I was able to set up the rules to read a
configuration file for Catalina with almost no problems.

I find myself wishing for a change and an enhancement, and thought I'd run
them by you first:

* Right now, you're passing in the root object that
  gets pushed on the stack.  This means you cannot
  use the ObjectCreate approach to create the outermost
  object with a configurable class name.  How about if we
  change this so that readXml() returns the very first object
  it adds to the hierarchy (i.e. the outermost object that
  it parses)?

* In Catalina, the set of rules to be configured will vary
  depending on how you are deploying your container
  hierarchy.  I could handle this in the shell program, but
  I'd prefer to add a method to XmlMapper that loads a
  set of rules from a resource file in some reasonable format.
  That way, you could support mutliple configuration file
  formats with a pretty generic startup/shutdown program.

I'd be happy to work on these (and add some more Javadocs :-).

> Costin


View raw message