tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Munz" <mm...@apelon.com>
Subject Configuring a web application at the container level
Date Wed, 15 Feb 2006 16:55:44 GMT
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
sample.com").  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
    mmunz@apelon.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message