4 Replies Latest reply on May 17, 2013 9:29 PM by drh01

    ModuleClassLoader for WAR only sees WEB-INF/lib and WEB-INF/classes (no "resources") ?

    drh01

      I am debugging a classloading issue; my spring ContextLoaderListener is attempting to load an XML file from WEB-INF/beanRefContext.xml.

       

      The appropriate ModuleClassLoader is being used (deployment.myapp.war:main), but a call to getResource("WEB-INF/beanRefContext.xml") (or other variations, classpath*:, etc.) always fail.

       

      I drilled down into the ModuleClassLoader in the debugger, and it appears it only contains JARs from WEB-INF/lib and class files from WEB-INF/classes... in fact I can step and watch it search inside each JAR for that file.  But it doesn't search the top-level root WEB-INF directory.

       

      Why can't this classloader load a resource from WEB-INF/ ?

       

      Thanks.