have you looked at WebAppClassloader.java to see how it is implemented in tomcat?
Also see the Loader element in server.xml to see if that would help you extend the WebAppLoader.java to implement your own WebAppClassloader Charlie > -----Original Message----- > From: Ola Berg [mailto:[EMAIL PROTECTED]] > Sent: Thursday, December 12, 2002 6:20 AM > To: Tomcat Users List > Subject: Re: [classloading] How to use URLClassLoader within a servlet > > > >Or you could try to isolate the problem with an example and post > >that to the list. > > The problem can be stated as > > ---8<--- > > URL[] urls = new URL[]{ new > URL("http://www.myserver.com/jars/myapi-1.2.jar") }; > URLClassLoader cl = new URLClassLoader( urls); //have tried > different parents > > //here it hangs > Class c = cl.loadClass( "nu.viggo.my.MyClass"); > > --->8--- > > Above snippet works in standalone app, but not in servlet. > > Tested with several kinds of URLs (class file directories, > jarfiles, http, ftp) same result. > > Any clues? Craig? Anyone? > > /O > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
