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.

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 :

  • weblogic.httpd.documentRoot
  • You may need to pre-pend the following properties to get the full path

  • weblogic.system.home
  • weblogic.system.name
The following is some sample code that should get you going

import weblogic.common.*;

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();
  }

}

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact