2 Replies Latest reply on May 2, 2007 4:16 AM by Sean Landsman

    Properties not visible to WebApp

    Sean Landsman Newbie


      I'm having a little trouble getting my app to resolve properties. This is compounded by the fact that the properties are loaded by a 3rd party library out of my control.

      My code layout is as follows:

      EAR [
      ... (other libraries)

      The problem is that the webapp is using library1.jar (implicitly) to load Properties.xml but cannot "see" it. If I place Properties.xml in webapp.war (under WEB-INF/classes) it loads.

      Is there a setting etc I can use in either jboss-app.xml or jboss-web.xml (or something else) to allow the webapp.war to "see" these properties files?

      many thanks,



        • 1. Re: Properties not visible to WebApp
          amit deshpande Newbie

          Actually your problem is because of class loaders as your war file will have different class loader allocated by tomcat so you will not be able to load your properties file from outside of war file.
          the file jboss-service.xml residing in jbossweb-tomcat55.sar\META-INF contains two different options as

          "<attribute name="Java2ClassLoadingCompliance">false</attribute>"

          "<attribute name="UseJBossWebLoader">false</attribute>"

          if you make these values to true then it will tell the jboss that war won't be having different class loaders anymore. But making these values to true is not a good practice


          • 2. Re: Properties not visible to WebApp
            Sean Landsman Newbie

            Hi amit_despande,

            Thank you for your response, -your suggestion did the trick!