1 Reply Latest reply: Mar 15, 2011 6:54 PM by Karsten Wutzke RSS

How do you read a resource from the root of an exploded webapp?

Karsten Wutzke Expert

Hello,

 

I have a localhost JBoss 6 setup with JBoss Tools and Eclipse doing the hot deploy of an exploded webapp. I used to launch my webapp via shell using main class with an explicit classpath (exploded and JAR) and deploy normally via WAR file. My resource loader used to work perfectly, but now since the webapp is on JBoss in an exploded directory structure with an "unknown" classpath, text file resources like "db/jpql/whatever.jpql" aren't found (null is returned, leading to an NPE).

 

The question is:

 

How do you load resources from the root (or outside of the WEB-INF dir) of an exploded webapp (in JBoss)? I checked the classpath which is nothing but C:\dev\jboss\bin\run.jar...

 

Is there a way to adjust the deployment descriptor or jboss-web config to add the root or a directory in the root to the classpath?

 

Karsten