Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1DC20C1F7 for ; Tue, 7 Aug 2012 16:39:40 +0000 (UTC) Received: (qmail 78635 invoked by uid 500); 7 Aug 2012 16:39:37 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 78389 invoked by uid 500); 7 Aug 2012 16:39:36 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 78380 invoked by uid 99); 7 Aug 2012 16:39:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 16:39:36 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [76.96.27.211] (HELO qmta11.emeryville.ca.mail.comcast.net) (76.96.27.211) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2012 16:39:29 +0000 Received: from omta14.emeryville.ca.mail.comcast.net ([76.96.30.60]) by qmta11.emeryville.ca.mail.comcast.net with comcast id joYt1j0041HpZEsABsf7fi; Tue, 07 Aug 2012 16:39:07 +0000 Received: from Christophers-MacBook-Pro.local ([98.226.18.8]) by omta14.emeryville.ca.mail.comcast.net with comcast id jsf51j00A0AT6Uq8asf6Tk; Tue, 07 Aug 2012 16:39:06 +0000 Message-ID: <502144AD.1090609@christopherschultz.net> Date: Tue, 07 Aug 2012 12:39:09 -0400 From: Christopher Schultz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: [Tomcat 7] Why can't you use automatic deployment and exploded WAR when docBase is outside appBase? References: In-Reply-To: X-Enigmail-Version: 1.4.3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Miguel, On 8/6/12 3:26 PM, Miguel Almeida wrote: > Consider the following context file jamesbond.xml in > $CATALINA_BASE/conf/[engine_name]/[host_name]): > > debug="0" privileged="true"> type="java.lang.String" override="true"/> > > *1)* In Tomcat 6 you'd update the war at /srv/apps and it would > automatically be redeployed and exploded. > > However, in Tomcat 7 this isn't happening. >> From the docs >> (http://tomcat.apache.org/tomcat-7.0-doc/config/host.html), a > new important text that wasn't in 6 reads: unpackWARs - (...) WAR > files located outside of the Host's *appBase* will not be > expanded. > > And in > http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Automatic%20Application%20Deployment: > > - - When using automatic deployment, the docBase defined by an XML > Contextfile > > should be outside of the > appBase directory. If this is not the case, difficulties may be > experienced deploying the web application or the application may be > deployed twice. The deployIgnore attribute can be used to avoid > this situation. > > Both these rules means you can't have automatic deployment of files > outside appBase and explode them (into appBase). Do you mean "automatic deployment" or "automatic redeployment"? If you want to update a WAR file that is outside of the appBase, then update the WAR file and then 'touch' the XML file in $CATALINA_BASE/conf/[engine_name]/[host_name]/jamesbond.xml. > Why is this? How can one have the same behaviour as in Tomcat 6: > have the war* outisde appBase*, use a context xml like the one > above and have the application exploded. Do you really care about the WAR file being exploded? If this is really a complaint about your question #2 (handled by others separately within this thread), then you should be using the temp dirs instead of getRealPath and you won't have to worry about the lack of WAR-explosion anymore. - -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/ iEYEARECAAYFAlAhRK0ACgkQ9CaO5/Lv0PBElgCff5o8N1rNnTKAZ1HHRKxBqKTU t+oAmwWEcvU1uDLWX6zkYNT+QnhLSqxk =Z6qA -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org