geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ruebsam <>
Subject Re: Regarding ClassLoader Changes in Geronimo 1.1
Date Mon, 10 Jul 2006 17:13:39 GMT
Manu George wrote:
> Hi,
>         I have an application that is packaged as an EAR. The WAR inside 
> the EAR is having some images in the images directory directly inside 
> the war. In Geronimo 1.0, I was able to access them using 
> Thread.currentThread().getContextClassLoader().getResource() method, but 
> now I am unable to do so. On debugging I found that the classloader I 
> got for 1.0 was WebappClassLoader from Tomcat which had access to the 
> files, while for 1.1, I got JarFileClassLoader of geronimo which did not 
> have access to those files. Can anyone throw further light on this problem.
> Thanks
> Manu


can you try to get the correct resource URL via the

URL javax.servlet.ServletContext.getResource(String path)

method? Once you have the base URL to the war you can easily load
your resources from the war.


View raw message