> -----Original Message----- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Friday, February 17, 2012 9:36 AM > To: Tomcat Users List > Subject: Re: generic deployment question > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jeffrey, > > On 2/16/12 4:12 PM, Jeffrey Janner wrote: > > I host an app for a couple of dozen customers. Naturally, upgrade > > time can be a bit of a pain, and I'd like to simplify things. > > Assuming that all the customer-specific information (DB connection > > info, logger info, etc.) can be described as resources in the > > context.xml file, would it be possible to put the actual webapp in > > a single pre-exploded directory without causing Tomcat fits? > > [snip] > > > Then when a new release comes out, I can deploy the web-app once > > and modify the individual customer's contexts to point to the new > > release path as they choose upgrade (or all at once). > > When you say "deploy the web-app once" you aren't really talking about > deploying it: what you mean is just throwing it up on the server on > the disk some place. A "deployment" is really when the context gets > launched and it available to clients. > > I don't see any reason why you couldn't do this. I agree with Pid that > you shouldn't explode the WAR file: there's no reason to do that > unless you have buggy code that doesn't fetch resources properly. I > think it would be as easy as this: > > 1. Get the WAR file into a new place: > > $ cp my-new-version.war \ > /path/to/non-auto-deploy-webapps/ > > 2. For each webapp you want to upgrade: > $ echo ",s/my-old-version\.war/my-new-version\.war/g" \ > | ed $CATALINA_BASE/conf/Catalina/[hostname]/webapp.xml > > If you have auto-deploy enabled, I believe this will cause Tomcat to > reload the context. If not, you may have to use the manager to either > re-load the context or re-deploy. > > - -chris
Chris- Thanks. I was under the impression that Tomcat normally explodes the war files when you drop them into the webapps folder, though I know you can disable that feature. I was under the impression that one should run from the exploded directory for performance reasons, i.e. it's faster to pull files from the directory than from inside the war file. If there really is no performance difference, then that's even more reason that I want to get my developers to get this thing down to a war file with no files I need to modify. Thanks again. Jeff __________________________________________________________________________ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system.