This content has been marked as final.
Show 5 replies
-
1. Re: Accessing resource in WAR using context class loader
alesj Jul 1, 2009 7:38 AM (in response to muellars)Where are you invoking this code?
What's the ClassLoader you're getting back?
etc ...
More info. ;-) -
2. Re: Accessing resource in WAR using context class loader
muellars Jul 1, 2009 8:25 AM (in response to muellars)I am invoking this code in a JSF managed bean.
The classLoader I am getting is: org.jboss.web.tomcat.service.WebCtxLoader$ENCLoader@165559e
The urllist in this class loader contains all *.jar files that are contained in the WEB-INF/lib. -
3. Re: Accessing resource in WAR using context class loader
alesj Jul 1, 2009 8:58 AM (in response to muellars)Can you check the parent of WebCtxLoader$ENCLoader?
As it should be your underlying war's CL, to which all is delegated:
- http://anonsvn.jboss.org/repos/jbossas/trunk/tomcat/src/main/org/jboss/web/tomcat/service/WebCtxLoader.java -
4. Re: Accessing resource in WAR using context class loader
muellars Jul 1, 2009 10:22 AM (in response to muellars)The parent CL is:
BaseClassLoader@3f275c{vfszip:/D:/jboss-5.1.0.GA/server/default/deploy/JSFBaseDemo.war/}
Invoking getResource("WEB-INF/faces-config.xml") still gives me a null URL. -
5. Re: Accessing resource in WAR using context class loader
alesj Jul 1, 2009 4:05 PM (in response to muellars)"muellars" wrote:
Invoking getResource("WEB-INF/faces-config.xml") still gives me a null URL.
Can you try debuging why this is so?
Or why this "BaseClassLoader@3f275c{vfszip:/D:/jboss-5.1.0.GA/server/default/deploy/JSFBaseDemo.war/}" returns null.
As I'm pretty sure it should find your file if it's really there.