> > From: Rutherford, Michael [mailto:[EMAIL PROTECTED] > > Subject: Determining the complete classpath for a web app in > > Tomcat 5.5 > > > > I am attempting to find a (preferably simple :-) way to find out the > > complete classpath for a web app. > > Not sure why you want to do this, but in any event, first Read The Fine > Manual: http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html > > If you have access to any Class object for the web app, you can get its > ClassLoader object. Assuming you're using Tomcat's standard > WebappClassLoader, this is a subclass of URLClassLoader, so it has a > getURLs() method that can be used to retrieve the paths it processes. > You can follow the getParent() chain of class loaders and do the same > thing all the way up to the system class loader. > > - Chuck
Thanks Chuck, I have read the Tomcat class loader doco but it for some reason I had never twigged about the URLClassLoader getURLs() method, possibly because the class-loader-howto.html doesn't detail what subclasses of ClassLoader Tomcat uses other than to say "a variety". I had assumed due to the way Tomcat finds all the jars in a directory that it must have implemented its own which wouldn't have been useful for what I needed. Next time I'll check better. Thanks for the pointer, Michael Rutherfurd ************** IMPORTANT MESSAGE ***************************** This e-mail message is intended only for the addressee(s) and contains information which may be confidential. If you are not the intended recipient please advise the sender by return email, do not use or disclose the contents, and delete the message and any attachments from your system. Unless specifically indicated, this email does not constitute formal advice or commitment by the sender or the Commonwealth Bank of Australia (ABN 48 123 123 124) or its subsidiaries. We can be contacted through our web site: commbank.com.au. If you no longer wish to receive commercial electronic messages from us, please reply to this e-mail by typing Unsubscribe in the subject line. ************************************************************** --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]