4 Replies Latest reply on Mar 29, 2011 9:14 AM by Felipe Armoni

    Accessing configuration files in JBoss 5.1

    Felipe Armoni Newbie

      Hi, I am updating a Web Service server from JBoss 4.2.2 to JBoss 5.1, however when I began to use JBoss 5.1 I've got an error saying that one of my properties files could not be loaded.


      I have put this file in the following path: C:\Servers\jboss-5.1.0.GA\server\default\conf


      And I am using the code below to get its path:



      String path;


      path = System.getProperty("catalina.base");

      path += System.getProperty("file.separator");

      path += "conf";

      path += System.getProperty("file.separator");


      As far as I know this code worked fine in JBoss 4.2.2, however in JBoss 5.1 the property "catalina.base" does not exists anymore (I believe that the getProperty method is returning null instead of the catalina.base actual value).


      Therefore I would like to know if there is any other property that returns the JBoss server folder or if there is a better way to access properties files inside JBoss 5.1.