tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Pierazzini <>
Subject Re: weird tomcat5.0.30 behaviour with jar in WEB-INF/classes
Date Wed, 01 Dec 2004 16:21:56 GMT
> Right, thought you were creating your own URLClassLoader instance to
> locate your jars dynamically (not getting the current).  Barring that
> and looking at your post and then looking at one of Yoavs, then my guess
> is the ClassLoader in tomcat is for what ever reason doing something like:
> if( name.endsWith(".jar") )
> {
>     //resolve to the home work dir.
> }

I agree

> regardless of the directory being lib or classes....seems like a bug to
> me as any file in the classpath should just be a file as a jar file
> should have to be added to the classpath like it's a directory.

I agree

> Anyways, are the file names hard coded in your app?  You can always come
> up with your own file name extension to work around the issue I suppose.

I thought about this possibility too,
I just checked URLClassLoader javadoc and yes, this is a viable
solution. In fact, URLClassLoader interprets every url pointing to non
dir as a JAR regardless to its name.


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

View raw message