tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Bremford <tom...@big.faceless.org>
Subject Re: ClassLoader woes in Tomcat 4.01 (IGNORE)
Date Sun, 11 Nov 2001 09:47:32 GMT
Sorry to follow myself up, but my bad.

I see now that
Thread.currentThread().getContextClassLoader().getResource() is the
method I should have been calling, which works fine.

Cheers... Mike


Mike Bremford wrote:
> 
> Hi all
> 
> I'm trying to load a resource from a JAR which I have placed in
> $TOMCAT_HOME/lib, but I can't seem to be able to access it from Tomcat
> 4. Works fine from an Application or Tomcat 3.2
> 
> The symptoms are when I call
> ClassLoader.getSystemResource("/path/to/myresource"), I get null. It is
> definately there. The JAR isn't signed, there's no other unusual stuff
> going on. I'm calling this from inside a Filter if it makes a
> difference.
> 
> Any ideas? If it helps the URL returned when I try this from an
> application is "jar:file:/home/mike/blah/myapp.jar!/path/to/myresource"
> 
> Cheers... Mike
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message