-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeffrey,

On 2/17/12 10:36 AM, Christopher Schultz wrote:
> 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.

http://tomcat.apache.org/tomcat-7.0-doc/manager-howto.html#Deploy_A_New_Application_from_a_Local_Path

You can deploy from an existing configuration file like this:
http://localhost:8080/manager/text/deploy?config=file:/path/context.xml

I'm not sure if "update=true" will work for that command, so you may
have to perform an undeploy first, then a re-deploy.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8+dVoACgkQ9CaO5/Lv0PCdCgCfR/YPqJIeorExHoy81ZA/rof1
9UAAoK+xFAjdHQu5P2VF87JGjGIOTD5T
=QVk/
-----END PGP SIGNATURE-----

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

Reply via email to