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.


Recommended Answers

All 2 Replies

you should store those files in your application's structure, not at appserver level.

Hi, thanks for your reply!

I am using these properties files so that I can change an URL that my application connects to without having to rebuild the whole thing.

Anyway I kept searching and found the answer on another forum. The jboss.server.config.url property gives me the conf directory as a URL (file:///c:/Servers/jboss-5.1.0.GA/server/default/conf).


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.