Query regarding Classpath in Tomcat
I wanted to understand how the classpath in tomcat can be modified to point to external directory.
I have a web application, say W that is deployed in tomcat. When I hit an API provided by W, the flow takes me to a jar, say A present in $CATALINA_HOME/lib, which internally calls another jar's API say B.jar.
The issue that I need to debug is that B.jar is present at two paths, i.e , at $CATALINA_HOME/lib and an external directory (outside context of tomcat", say /my/lib/.
When A calls B.jar it first picks the jar from external directory even when B.jar is present in $CATALINA_HOME/lib.
I have checked catalina.properties, for common and shared class loader libraries but I could n't B.jar anywhere specified.
Is there any way via which we can set custom libraries in Tomcat classpath ahead of libraries present in tomcat context?
How can I check the classpath being used by A.jar where external directory has been set by default for all other jars as well?