I\'m looking to implement a custom Valve and configuring it using META-INF/context.xml.
At the moment though, when context.xml is parsed during deployment, Tomcat (6
You can not load Valve
s from inside the webapp class loader. If you look at http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html it shows the available class loaders. You must use one of the Bootstrap, System or Common classloaders because Valve
definitions are processed BEFORE the individual webapp classloaders are created: the Context has to be processed before the webapp is available.
Package your Valve in a jar by itself and copy it into the $CATALINA_HOME/lib
folder and you should be all set.