> -----Original Message----- > From: Peter Crowther [mailto:[EMAIL PROTECTED] > Sent: Monday, February 14, 2005 12:20 PM > To: Tomcat Users List > Subject: RE: URL protocol handler issues > > How are you examining the source of this method, by the way?
If you downloaded the JDK you already have the source code of the URL class on your hard disk ($JDK_HOME/src.zip). > > > - To solve the problem temporarily is put the protocol handler in the > > class path. > > - The disadvantage with this method is you need to distribute the > > protocol handler separately. And if you need classes from the web > > application, you need to add the webapp class repository > the protocol > > handler's list of repositories. > > Hmm. That's going to be fun - there's a good few jars that > would be needed. I'll see if I can separate them out. > > Martin, thanks for the input. I'm still interested in *why* > the expected classloader isn't used - anyone got any insights? The document at http://jakarta.apache.org/tomcat/tomcat-5.5-doc/class-loader-howto.html elaborates on class loading. The reason why neither the system class loader nor the premodial classloader load your class is that each webapp has its own classloader that is separated from the rest of tomcat, i.e. class com.mycomp.MyClass in webapp A is a different type than com.mycomp.MyClass in webapp B. The tomcat plugin for Eclipse uses a classlaoder DevClassLoader that could provide a solution to the problem. But again, the class loader mut be put in tomcat's classpath or the VM's bootstrap path and cannot be packaged together with your webapp. --- Martin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
