3

I have an application which acesses a lot of property files. In jboss 5.1 we can load this from the conf directory. I would like to know if there is any such way of loading the property files in weblogic 10.3 .

I don't want to include it in an jar and place in the lib,since these property files are configurable files. The user needs to configure certain properties of the application.

Also placing the property files in the domain directory is not very good and I also would like to know if there is any other way of achieving the same .

Regards Raj

Mark Hall
  • 53,938
  • 9
  • 94
  • 111
Raj
  • 31
  • 1
  • 4
  • See the options given here http://stackoverflow.com/questions/6664021/external-properties-file-with-weblogic – JoseK Aug 25 '11 at 08:42

1 Answers1

1

You can place the properties files needed by your application(s) to the classpath of Weblogic and then remove the files from your WAR/JAR/EAR.

If you choose a specific folder that is not yet in your classpath, just log on the Weblogic console, and navigate through Environment -> Servers -> [Your server name] -> Configuration -> Server Start
Now it is just about adding the folder containing your properties file(s) to the classpath.

Viccari
  • 9,029
  • 4
  • 43
  • 77
  • Can you give me an example on how the classpath entry should look like? I'm trying to add logback.xml to the classpath. But WebLogic does not find the logback.xml when I add the path to the folder containing the file to the classpath field, as you described. – Matthias B Apr 18 '13 at 09:23
  • According to the [docs](http://docs.oracle.com/cd/E21764_01/apirefs.1111/e13952/pagehelp/Corecoreserverserverconfigserverstarttitle.html#attributes), it depends on which OS you are using. – Viccari Apr 18 '13 at 12:55