0 Replies Latest reply on Sep 10, 2002 5:48 PM by Craig Brown

    JBoss3.0.1+Jetty Can't find properties files in WAR

    Craig Brown Newbie

      I am attempting to move an existing application from using a standalone Tomcat with JBoss to using the JBoss/Jetty (3.0.1) bundle. All has worked well until a branch of the code was hit where a class attempts to load a properties file. The property file is located in the WEB-INF/classes directory and is able to be loaded when deployed under Tomcat. Under Jetty, the property file cannot be loaded.

      MyWar.war contents:

      MANIFEST.MF
      WEB-INF/web.xml
      WEB-INF/classes/MyProperties.properties
      WEB-INF/lib/MyJar.jar

      According to the jmx-console, the ClassPath for MyWar.war includes the WEB-INF/classes directory, but when getResourceAsStream("/MyProperties.properties") is called from one of the classes in MyJar.jar, it returns null.

      Jetty is configured to unpack wars, and I have verified that the WAR is being unpacked.

      Any help or suggestions would be appreciated.