tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: how to get WebClassLoader Classpath ?
Date Fri, 07 Nov 2003 04:02:16 GMT
Since WebappClassLoader extends URLClassLoader, you could also use the
getURLs method of URLClassLoader.

"Shapira, Yoav" <> wrote in message

Assuming you mean beyond the classpath documented in the Classloder
HOW-TO, you'd have to write some tomcat specific code.  In your webapp,
you would do:

import org.apache.catalina.Loader;

ClassLoader cl = this.getClass().getClassLoader();
Loader catalinaLoader = (Loader) cl;
String[] repositories = catalinaLoader.findRepositories();

But why do you want to do this?

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: mourad jaber []
>Sent: Thursday, November 06, 2003 12:25 PM
>To: Tomcat Users List
>Subject: how to get WebClassLoader Classpath ?
>I need to get the classpath used by classloader of my web app...
>System properties don't help me, as there are not used by
>of tomcat...
>How can I get it ?
>Any idea
>To unsubscribe, e-mail:
>For additional commands, e-mail:

This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.

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

View raw message