Используя ответ Себастьяна выше, я создал этот кусок кода, который помог мне.
ClassLoader c=getClass().getClassLoader();
logmsg("c="+c);
URLClassLoader u=(URLClassLoader)c;
URL[] urls=u.getURLs();
for (URL i : urls) {
logmsg("url: "+i);
}
Это дало этот результат:
classpath=/dd/apache-tomcat-7.0.29/bin/bootstrap.jar:/dd/apache-tomcat-7.0.29/bin/tomcat-juli.jar
c=WebappClassLoader
context: /xxx
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@35c0e45a
url: file:/DT/DEV/dev/mko/apache-tomcat-7.0.29/webapps/xxx/WEB-INF/classes/
url: file:/DT/DEV/dev/mko/apache-tomcat-7.0.29/webapps/xxx/WEB-INF/lib/commons-codec.jar
url: file:/DT/DEV/dev/mko/apache-tomcat-7.0.29/webapps/xxx/WEB-INF/lib/commons-fileupload.jar
url: file:/DT/DEV/dev/mko/apache-tomcat-7.0.29/webapps/xxx/WEB-INF/lib/commons-logging-api.jar
url: file:/DT/DEV/dev/mko/apache-tomcat-7.0.29/webapps/xxx/WEB-INF/lib/commons-logging.jar
url: file:/DT/DEV/dev/mko/apache-tomcat-7.0.29/webapps/xxx/WEB-INF/lib/freemarker.jar
url: file:/DT/DEV/dev/mko/apache-tomcat-7.0.29/webapps/xxx/WEB-INF/lib/h2.jar
url: file:/DT/DEV/dev/mko/apache-tomcat-7.0.29/webapps/xxx/WEB-INF/lib/js.jar
url: file:/DT/DEV/dev/mko/apache-tomcat-7.0.29/webapps/xxx/WEB-INF/lib/log4j-1.2.8.jar