Thank you all for your comments!  They were very helpful!

Unfortunately, the war file containing the test application was stripped from 
my original e-mail.

This is actually code that I inherited from someone else.  They were running it 
under Tomcat 5 and when I ran it under Tomcat 6, it didn't work the same way, 
which is why I started looking into this.  Also, the actual code is not in a 
servlet.  I just put it in a servlet in the test application so I could easily 
execute the same code when Tomcat was started.

Thanks again,

Pat

-----Original Message-----
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Friday, May 22, 2009 3:34 PM
To: Tomcat Users List
Subject: RE: different behavior in processing jar files in Tomcat 5.0.28 
andTomcat 6.0.18

> From: Christopher Schultz [mailto:ch...@christopherschultz.net]
> Subject: Re: different behavior in processing jar files in Tomcat
> 5.0.28 andTomcat 6.0.18
> 
> On 5/22/2009 2:29 PM, Guimaraes, Patricia (NIH/NLM) [C] wrote:
> > Essentially, when running my Java code which calls method
> > getResource(String name) of class Class to find a resource 
>
> So, you're calling ServletContext.getResource(String)

No, Class.getResource() - the difference is significant.  I don't think 
ServletContext.getResource() will look inside .jar files.

The proper method is still getResourceAsStream(), but using the classloader or 
the class.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

Reply via email to