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 28AD3EAF1 for ; Sun, 3 Mar 2013 15:29:38 +0000 (UTC) Received: (qmail 21863 invoked by uid 500); 3 Mar 2013 15:29:34 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 21617 invoked by uid 500); 3 Mar 2013 15:29:34 -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 21608 invoked by uid 99); 3 Mar 2013 15:29:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Mar 2013 15:29:34 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.mk.green@gmail.com designates 209.85.216.181 as permitted sender) Received: from [209.85.216.181] (HELO mail-qc0-f181.google.com) (209.85.216.181) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Mar 2013 15:29:29 +0000 Received: by mail-qc0-f181.google.com with SMTP id a22so622446qcs.12 for ; Sun, 03 Mar 2013 07:29:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=w7sQPsPnxyHinaB8CKgDPUYtOo9Zvj9E412N0AzzhIk=; b=C5RIxZIkXc1IcPkvdapFiBesN+6yuZrvUYByEurN3UgPzrEM+IUbptXDL/3poCyEvt HZg14ti8D7QUTNDExAAVFIjqnPPsRRwZ16TENhrEZl68lRpGZlpDdfWN2QTxSRBZqjOV Sz3b5alwRXBTBJFjqHxl2rTF7lH23e1ndHRTpkl0HDM9nXMgYPppukk0a68u7DBh5DX4 Spry5Thdb7s6VjGqd8GNEMy+x+w8sAXHYg6KUhaqWEBC9F2g4S71vlRIj1CklK0hMJUz 7AColf34PZ58GHYId9q25UpP3ouCGa+xuKhhaMcYsz2NzJa3megshnJ6lj7uTUGS3y9w ij6Q== MIME-Version: 1.0 X-Received: by 10.49.12.194 with SMTP id a2mr30163924qec.11.1362324548744; Sun, 03 Mar 2013 07:29:08 -0800 (PST) Received: by 10.49.35.204 with HTTP; Sun, 3 Mar 2013 07:29:08 -0800 (PST) In-Reply-To: <51335EFB.4090003@apache.org> References: <51335EFB.4090003@apache.org> Date: Sun, 3 Mar 2013 15:29:08 +0000 Message-ID: Subject: Re: Context.xml ignored. From: James Green To: Tomcat Users List Content-Type: multipart/alternative; boundary=047d7b6787d2cc18d904d706e6e3 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6787d2cc18d904d706e6e3 Content-Type: text/plain; charset=ISO-8859-1 On 3 March 2013 14:32, Mark Thomas wrote: > On 03/03/2013 14:24, James Green wrote: > > On 3 March 2013 11:34, Konstantin Kolinko > wrote: > > > >> 2013/3/3 James Green : > > > So now I have a war deployed. Easy enough. Now to set the URL path. > There a > > lot of talk about Context Descriptors on that page, and at the top one > > seems to be read from webapps/[my-war-file]/META-INF/context.xml. > Perfect, > > but what goes in it? > > > > Elsewhere, I find Config, and in there we find Context. Aha! Parallel > > Deployment? Nope don't want that. Naming? I read that several times, and > I > > have no idea still what is trying to be expressed. Does it even apply to > > me? Not sure, let's move on > > Stop here. The naming section is exactly the bit you need to understand. > > I'm sure there is scope to improve the docs so if you explain where you > start to get lost we can look at improving the wording / adding > additional explanation as required. > > Diving straight into the Naming section then we describe a relationship involving these elements: - Context Name - Context Version - Context Path - Base file name Is the base file name the name of the war file built? Are the context elements name, version and path, supposed to come from the context.xml file? Other than path, they are not listed in the attributes further down the page. So now I'm being told that a set of rules apply when no version is specified. Still no idea where a version gets specified though: is it read from the war filename? Going to have to ignore this for now. Now on to something that appears reasonably clear: If you want to deploy a WAR file or a directory using a context path that is not related to the base file name - yes! then one of the following options must be used to prevent double-deployment - double deployment? Does this still apply to deployment in general or some particular circumstance in which double-deployment would happen? Disable autoDeploy and deployOnStartup and define all Contexts in server.xml - given the dynamic nature of our development, that is definitely not desirable Locate the WAR and/or directory outside of the Host's appBase and use a context.xml file with a docBase attribute to define it. - you want me to hook in the war from outside Tomcat? Not clear why I would want to do that. If I may digress some further: Looking at the FAQ, under Deployment, I'm am told that META-INF/context.xml is still recommended for Tomcat 7. I am still left wondering what I should be doing... James --047d7b6787d2cc18d904d706e6e3--