tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: internal tomcat server.xml parsing
Date Wed, 14 May 2008 17:36:42 GMT
Hash: SHA1


Ramesh Narayanan (ramesnar) wrote:
| Has anyone ventured into modifying the conf/server.xml file using the
| default internal XML parser of tomcat?

IIRC, Tomcat uses commons-digester to load its XML configuration. The
digester does not have POJO->XML capabilities, so you'll have to build
them yourself.

| I am currently in a midst of a project where I am securing all in
| bound and out bound communications and to that effect I have
| generated a SSL certificate using our CA and when I configure
| manually the new keystore, keypass, truststore, trust password,
| everything works like a charm. I need the capability to just go and
| change these attribs at run time and restart the tomcat server and
| want the new cert to load.

I would recommend parameterizing the server.xml file and using simple
string replacement rather than re-parsing the server.xml file each time
and re-writing the entire thing. This will allow you to keep comments
and leave unexpected elements untouched.

- -chris

Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message