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 source.
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 reasons. Everything is much more convenient now. Thanks for all your advice. Jason On Tue, Nov 4, 2008 at 5:15 PM, Christopher Schultz <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > 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 .ant.properties) 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 > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkkQyYEACgkQ9CaO5/Lv0PBzXQCdH4lqz0vHbGOChbEJIihowz50 > 2lsAoK6obiLTx09nSb7+8taZxxITlpjM > =GAv3 > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]