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
Hi,
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.
Thanks,
Mario