tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Williams <>
Subject /META-INF/context.xml seemingly ignored
Date Sat, 03 Aug 2013 18:54:35 GMT

I'm using Tomcat 8.0.0-RC1. Hopefully I'm just missing something here. I created a web application
with the following /META-INF/context.xml file (I tried both with and without the path="/support"

<?xml version='1.0' encoding='utf-8'?>
<Context path="/support">
    <Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/>

The JAR containing the TomcatInstrumentableClassLoader is in TOMCAT_HOME/lib. However, when
the application starts the class loader is still Tomcat's WebappClassLoader.

So, I moved the <Loader> element to TOMCAT_HOME/conf/context.xml and now it works. When
the application starts the class loader is the TomcatInstrumentableClassLoader.

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).

Am I doing something wrong here, or is this a bug?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message