Hi ,
               Thanks for the tip. I was wondering why the behaviour has changed though. Whatever I am using works on another app server like Websphere and also in 1.0 of Geronimo where tomcat's classloader is used. My question is shouldn't the Web Application Classloader have access to the resources outside of the WEB-INF directory inside the war? On glancing through the spec I didn't see anything abt it but most of the app servers seem to support this.

Thanks
Manu

On 7/10/06, Mario Ruebsam <[EMAIL PROTECTED]> wrote:
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


Reply via email to