Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 19563 invoked from network); 3 Mar 2011 18:03:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Mar 2011 18:03:18 -0000 Received: (qmail 8564 invoked by uid 500); 3 Mar 2011 18:03:15 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 8409 invoked by uid 500); 3 Mar 2011 18:03:14 -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 8399 invoked by uid 99); 3 Mar 2011 18:03:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Mar 2011 18:03:14 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of thomas@freit.ag designates 88.198.7.117 as permitted sender) Received: from [88.198.7.117] (HELO chuck.darkwhole.de) (88.198.7.117) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Mar 2011 18:03:07 +0000 Received: from xdsl-78-35-54-244.netcologne.de ([78.35.54.244] helo=[192.168.1.11]) by chuck.darkwhole.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1PvCrO-0007SI-2x for users@tomcat.apache.org; Thu, 03 Mar 2011 19:02:46 +0100 Message-ID: <4D6FD7C0.60204@freit.ag> Date: Thu, 03 Mar 2011 19:02:40 +0100 From: Thomas Freitag User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: users@tomcat.apache.org Subject: Re: Error in Tomcat when redeploying the Web application References: <20110303143459.GP24174@darkwhole.de> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Keshav, On 03/03/2011 05:07 PM, Keshav Arora wrote: > Thomas, > > Thanks so much for your reply! > > Yes you are correct, we redeploy the application by copying the new version > of war file to webapps folder. I've created a build script that builds the > war file and copy it to Tomcat\webapps folder. Tomcat is installed on my > local machine. So file is always copied on the same files system. Process > was same when we were using Tomcat 6.0.29. So I'm not sure why we are > getting the errors with Tomcat version 7. Moving (or renaming as Konstantin suggested) on a filesystem is faster than copying because only some filesystem metadata has to be changed. Reason for the error could be different Tomcat behavior in context.xml reading as Konstantin wrote. > Can you please elaborate regarding context descriptor file? You don't have to put your war files in the webapps directory another option is to put a context descriptor file in conf/Catalina/localhost which points to your war. A Simple example: All war files are in a designated directory /opt/mywars, Tomcat is installed in /opt/tomcat. You could deploy a webapp w1 (/mywars/w1.war), by putting a file named w1.xml in /opt/tomcat/conf/Catalina/localhost. The file should contain (at least) the following: You should check if your war contains a META-INF/context.xml with additional configuration, if yes put this in w1.xml as well. If you have a new war file version, put it under /opt/mywars/w1_v.war and update the value of the docbase attribute in /opt/tomcat/conf/Catalina/localhost/w1.xml. Tomcat will redeploy the app for you. Context path will be /w1... But I think the move or rename approach fits your needs for developement purposes and is a bit simpler. Regards, - -- Thomas Freitag -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk1v17sACgkQGE5pHr3PKuX+ZgCggEJ1JxCOOhbyptDc6Huvq1np HjUAn3ZzxNpH7ePd+S5w+dtuh1GDrkef =yvKD -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org