tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Mixon" <>
Subject RE: Configuring a web application at the container level
Date Fri, 17 Feb 2006 11:34:54 GMT

We just modify the apache-tomcat-5.5.15-deployer/build.xml script to
customize the application when it compiles and deploys it.
It's a standard ant build.xml, we just added another target that lets us
modify properties and other files for the specific host we are deploying to.
Theres a file in the same directory that we add
host-specific settings to.
Hope this helps - Richard 

-----Original Message-----
From: Matt Munz [] 
Sent: Wednesday, February 15, 2006 9:56 AM
Subject: Configuring a web application at the container level

Hi all,

  Here's a newbie question -- I'm looking forward to RTFM :)  I would like
to find a consistent way to do application-specific configuration of a web
application.  Is there a best-practice for this that you might recommend?

  Consider the following example.  I have a hello world application that
contains one servlet, which outputs the string "Hello World".  The
application is bundled in hello-world.war, which I will then deploy in
various tomcat instances.  

  Now, if I want to make the output string configurable, I might make an
entry in web.xml for this.  If I do it this way, then, at each deployment, I
have to unpack the web.xml and edit it to include the correct configuration
setting (e.g. "Hello World, from your friends at").  Yuck.  I'd
much rather put these configuration settings in a central file or registry
for each tomcat instance, and then hello-world.war could just inherit those
settings from the container.
That way I edit the configuration file once, and each re-deploy doesn't
require a re-edit of the configuration file.

  So, how do I do that?  JNDI, JMX, something else?    

  Thanks for considering this question.

  - Matt Munz

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message