RE: Why myApps classpath is tomcat/common

2009-08-13 Thread Caldarale, Charles R
> From: Lin Chun [mailto:franks1...@gmail.com] > Subject: Re: Why myApps classpath is tomcat/common > > I log the classpath by > > MyClass.class.getClassLoader().getResource("/") > Thread.currentThread().getContextClassLoader().getResource("") I see no

Re: Why myApps classpath is tomcat/common

2009-08-13 Thread Lin Chun
s1...@gmail.com] > > Subject: Re: Why myApps classpath is tomcat/common > > > > this.getClass().getClassLoader().getResource() > > Thread.currentThread().getClassContext().getResource() > > > > they were all pointed to tomcat/common > > How did you determin

RE: Why myApps classpath is tomcat/common

2009-08-12 Thread Caldarale, Charles R
> From: Lin Chun [mailto:franks1...@gmail.com] > Subject: Re: Why myApps classpath is tomcat/common > > this.getClass().getClassLoader().getResource() > Thread.currentThread().getClassContext().getResource() > > they were all pointed to tomcat/common How did you determi

Re: Why myApps classpath is tomcat/common

2009-08-12 Thread Lin Chun
hi chris I've turned to this.getClass().getClassLoader().getResource() Thread.currentThread().getClassContext().getResource() they were all pointed to tomcat/common finally I uncompressed the jar to /myApps/WEB-INF/classes, that solved the problem. i follow the doc of tomcat, the jars under /WEB

RE: Why myApps classpath is tomcat/common

2009-08-12 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: Why myApps classpath is tomcat/common > > Note that this uses the "system" ClassLoader to locate resources. I > suspect the CLASSPATH for that loader is something like > /opt/sun-jdk-x-y-z

Re: Why myApps classpath is tomcat/common

2009-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lin, On 8/12/2009 9:43 AM, Lin Chun wrote: > I have a java class packaged in a jar in /myApp/WEB-INF/lib > In this class I have to get a resouce , > > ClassLoader.getSystemResource(CONFIG_FILE_NAME).toURI()) Note that this uses the "system" ClassLo

Why myApps classpath is tomcat/common

2009-08-12 Thread Lin Chun
Hi, I have a java class packaged in a jar in /myApp/WEB-INF/lib In this class I have to get a resouce , ClassLoader.getSystemResource(CONFIG_FILE_NAME).toURI()) I get null of this, when I trace the pb I find that the current path of class was "tomcat/common" but not myApp/WEB-INF/lib regard,