[Gllug] OT: Tomcat & Apache mapping problem

Mike Brodbelt mike at coruscant.demon.co.uk
Wed Mar 23 15:18:11 UTC 2005


On Wed, 2005-03-23 at 14:27 +0000, Russell Howe wrote:
> On Wed, Mar 23, 2005 at 12:20:45PM +0000, Tethys wrote:
> > Indeed :-) Tomcat's problems, though, stem as much from its hideously
> > inappropriate use of XML for config files as much as they do from its
> > use of Java (although that itself does cause many, many problems).
> 
> Have you ever seen Jetty's configuration file?
> 
> It doesn't have one - you're required to write a Java class which does
> the initial setup (adding webapps, etc) and then launches the server.

Eeuucckk. Do the people who write these things ever have to actually
*use* them in production?

> That's my main gripe with XML configuration files for Java stuff - the
> documentation. The DTD, if even available, is often commented so
> spartanly that it's impossible to use without examples to base your work
> on.

XML is hideous for config files. It's incredibly verbose, awkward to
edit, ugly, and doen't lend itself to simple processing with Unix filter
type programs. If I have a normal config file, I can strip all the
comments and see what's actualy there with a simple 'grep -v "^#" FILE'
command. Equally, I can do scripted edits, and trivial awk'ish stuff. If
I want to see what shells people have, I just do:-

cat /etc/passwd | awk -F: '{print $7}'

That's one contrived example, but there's a whole array of this sort of
stuff that I use every day as part of system administration, and none of
it works properly with XML based config files. Doubtless someone will
spring to XMLs defence by pointing me at parsers and perl modules and
all sorts, but that's not the point. I have a good set of tools and
utilities that work well, and people writing Java code (or GNOME) seem
to think that they have a mandate to throw the whole lot out "just
because". Even editing the damn files is a pain - you have to use a
syntax highlighting editor just to have a clue what's commented and
what's not in an XML config file.

Mike.

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list