tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Cipriani" <>
Subject Re: Convenient web application configuration.
Date Thu, 06 Nov 2008 20:14:44 GMT
My end solution ended up being to modify
$CATALINA_ROOT/conf/context.xml and put the JNDI data source
definition there. While I agree that modifying global server files is
less than ideal it is by far the simplest solution: It's only one
resource element that has to be added, it requires no modification to
deployment scripts, and solves the problem of site-specific data

I left non site-specific servlet context configuration in each
servlet's web.xml.

Then, I moved site-specific servlet context parameters into the
database. This ended up working out really nicely for a number of

Everything is much more convenient now. Thanks for all your advice.


On Tue, Nov 4, 2008 at 5:15 PM, Christopher Schultz
<> wrote:
> Hash: SHA1
> Jason,
> Jason Cipriani wrote:
>> I'm developing with Eclipse but could configure custom build steps
>> with ant. This solution would remove most of the inconvenience, but I
>> would still have to make 4 separate WARs available for distribution.
>> Not *too* big of a deal but I'd rather just distribute a single
>> archive.
> If you need a different web.xml file for each machine, they you will, by
> definition, require a different WAR for each machine. There's really
> nothing you can do about that.
> Another option would be to configure your application using something
> other than web.xml.... but then you've just moved the problem to another
> file.
> We use a file in the user's home directory (called that
> includes machine-specific environmental information. To deploy, we grab
> the source from CVS and run "ant install" which does everything,
> including merging the machine-specific configuration into the WAR and
> deploying it. We have a small number of production machines, so this
> isn't a big deal for us. If we had a large number, we'd just further
> script the process by allowing the WAR creation to be parameterized by,
> say, command-line switches (which they really are, since you can define
> any ant property right on the command-line).
> Hope that helps,
> - -chris
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla -
> 2lsAoK6obiLTx09nSb7+8taZxxITlpjM
> =GAv3
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message