How can I get access to the properties of my running WebLogic server that have been set inside the weblogic.properties file? In particular I am after the document root of my server.
Created Aug 25, 2000
Robert Castaneda In WebLogic 5.1, to gain access to the weblogic properties, you can use the ConfigServicesDef interface which is accessible from the T3Client.
The particular property that you are after is :
import weblogic.common.*;
- weblogic.httpd.documentRoot
- weblogic.system.home
- weblogic.system.name
You may need to pre-pend the following properties to get the full path
public class SimpleT3Client {
public static void main(String[] argv) throws Exception {
T3Client t3 = new T3Client("t3://localhost:7001");
t3.connect();
String prop = t3.services.config()
.getProperty("weblogic.httpd.documentRoot");
t3.disconnect();
}
}