1 Reply Latest reply on Jan 31, 2002 9:51 AM by Patrick

    Classloader BUG - Properties files in WAR file not found

    Patrick Newbie

      There appears to be a classloader problem that prevents properties files being found, when the properties file is in a WAR file (inside my EAR file).

      I am using Struts nightly build with JBoss2.4.4 and Catalina 4.0.1.

      Everything works fine, except that the resources.properties file loaded by the controller servlet isn't picked up unless i put it in either
      /jboss/conf/catalina/
      OR
      /jboss/lib/ext/

      I should be able to put it in myApp.jar or in WEB-INF/lib/classes in my WAR (both of which are in the EAR file) and have it picked up in the same way but this does not work.

      Anyone else seen this or know of a work-a-round (apart from sticking it on the global classpath which seems a little kludgey)?

      Cheers,

      Patrick

        • 1. Re: Classloader BUG - Properties files in WAR file not found
          Patrick Newbie

          Actually, it appears to not be a bug so much as a general problem with deploying EARS with WARS.

          The solution to the problem above is simple:

          1) Use JBoss2.4.4 and Catalina 4.0.1
          2) Put struts.jar, commons-xxxx.jars in WEB-INF/lib inside the WAR file and NOT in the common classpath of Jboss (lib/ext) (which is where I had them previously)
          3) Put properties file in WEB-INF/classes/my_props.properties