tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cox, Charlie" <c...@cincom.com>
Subject RE: [classloading] How to use URLClassLoader within a servlet
Date Thu, 12 Dec 2002 14:02:58 GMT
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:ola.berg@ports.se]
> 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:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message