Feel free to post the aberrant code as 90% of the folks on the list have coded at one time or another
HTH Martin ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > From: pguimar...@mail.nlm.nih.gov > To: users@tomcat.apache.org > Date: Fri, 22 May 2009 16:04:24 -0400 > Subject: RE: different behavior in processing jar files in Tomcat 5.0.28 > andTomcat 6.0.18 > > 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. _________________________________________________________________ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009