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 293D61017E for ; Sun, 4 Aug 2013 12:21:37 +0000 (UTC) Received: (qmail 52010 invoked by uid 500); 4 Aug 2013 12:21:33 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 51553 invoked by uid 500); 4 Aug 2013 12:21:30 -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 51543 invoked by uid 99); 4 Aug 2013 12:21:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Aug 2013 12:21:29 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dmikusa@gopivotal.com designates 209.85.128.46 as permitted sender) Received: from [209.85.128.46] (HELO mail-qe0-f46.google.com) (209.85.128.46) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 04 Aug 2013 12:21:23 +0000 Received: by mail-qe0-f46.google.com with SMTP id i11so1206070qej.5 for ; Sun, 04 Aug 2013 05:21:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=Z8XkPgq0PxNnN//TMW5qgXfpRdMTZz+ZViIV1UsO6I8=; b=ZDWUqpJOhpoYVnn3hOkRL3kfS+33byxr6D7TOnEWomSENjojh21LF3LWganznw7Ix+ 1Tl6/v6z/2SKMFeIYYEjILHg80LBkGdXCNE4bjKGJn86N/+DHdfpSPYQY5aZEne5hcmX 10yl24PNDtIIwkxQkA533xaqGvaxYpRvtR1nH+40v2tIWJEKDlzNvSxyzlksdAYQOhFF DMG094quK8fd4/496GsfZPOJ66PYacwCLVWphTAlyCR3D4ROD0ARnlTt67oBVK6j5ReW +wTQ2EX4XWM9BKDJTv7lARxk0uwe7ydK5BkMEOMId4h16a5Sr6YH9n13M/W5hxjeRHAR uU0A== X-Received: by 10.224.223.136 with SMTP id ik8mr21880483qab.110.1375618862956; Sun, 04 Aug 2013 05:21:02 -0700 (PDT) Received: from [192.168.0.6] (d118-75-246-224.col.wideopenwest.com. [75.118.224.246]) by mx.google.com with ESMTPSA id w2sm1335382qec.8.2013.08.04.05.21.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 04 Aug 2013 05:21:02 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: /META-INF/context.xml seemingly ignored From: Daniel Mikusa In-Reply-To: <80D20DED-AEB1-4E31-B225-85ECBF3AF577@nicholaswilliams.net> Date: Sun, 4 Aug 2013 08:21:09 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <22514507-C92B-4091-A4C8-18D1538EAEE4@gopivotal.com> References: <95A7DCF4-93B1-4389-9C67-A255F0D6B1F2@nicholaswilliams.net> <51FD8CB7.4020806@christopherschultz.net> <80D20DED-AEB1-4E31-B225-85ECBF3AF577@nicholaswilliams.net> To: "Tomcat Users List" X-Mailer: Apple Mail (2.1508) X-Gm-Message-State: ALoCoQneirRev0frxMq90TYPGpHPaLOIRmcQOTjkdVyhCRb229E4b1/VnyJi172CSjwFINcG2EQp X-Virus-Checked: Checked by ClamAV on apache.org On Aug 3, 2013, at 8:27 PM, Nick Williams = wrote: >=20 > On Aug 3, 2013, at 6:05 PM, Christopher Schultz wrote: >=20 >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA256 >>=20 >> Nick, >>=20 >> On 8/3/13 2:54 PM, Nick Williams wrote: >>> I'm using Tomcat 8.0.0-RC1. Hopefully I'm just missing something=20 >>> here. I created a web application with the following=20 >>> /META-INF/context.xml file (I tried both with and without the=20 >>> path=3D"/support" attribute). >>>=20 >>>=20 >>> = =20 >>> >> = loaderClass=3D"org.springframework.instrument.classloading.tomcat.TomcatIn= strumentableClassLoader"/> >>>=20 >>>=20 >> >>=20 >> If you are using META-INF/context.xml, then the "path" attribute is >> definitely illegal/ignored. >>=20 >> I haven't read the Javadoc for Tomcat 8 yet, but I think you want: >>=20 >> >>=20 >> Instead of "loaderClass". At least, that's what it would have been = for >> Tomcat 7. >=20 > className is for specified a different Loader implementation. = loaderClass is for specifying a different ClassLoader. It's very = confusing, but this is definitely right. >=20 >>=20 >>> The JAR containing the TomcatInstrumentableClassLoader is in=20 >>> TOMCAT_HOME/lib. However, when the application starts the class=20 >>> loader is still Tomcat's WebappClassLoader. >>>=20 >>> So, I moved the element to TOMCAT_HOME/conf/context.xml >>> and now it works. When the application starts the class loader is >>> the TomcatInstrumentableClassLoader. >>=20 >> That's odd. >>=20 >>> Note that I have confirmed the context.xml file IS in META-INF at >>> the root of my web application (not in /WEB-INF/classes/META-INF). >>> I also noticed that TOMCAT_HOME/conf/Catalina/localhost is empty. >>> There are no files or other directories in that directory at all. >>> So, it would appear that my context.xml is not getting copied. I >>> don't know whether or not that matters. I am deploying my >>> application as an exploded directory (not a WAR), and it is in an >>> external directory (it is not in TOMCAT_HOME/webapps). >>>=20 >>> Am I doing something wrong here, or is this a bug? >>=20 >> Anything in the "work" directory? CATALINA_BASE/conf/[Engine]/[Host]/ >> should be where context.xml files are copied, so .. this definitely >> looks fishy. >=20 > Yes. There's a TOMCAT_HOME/work/Catalina/localhost/support directory, = but TOMCAT_HOME/conf/Catalina is empty. What does your tag look like? Do you have deployXML or copyXML = set? http://tomcat.apache.org/tomcat-7.0-doc/config/host.html#Standard = Implementation Dan >=20 > Nick > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org