> 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
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
> 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
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
> 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
-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
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,