from web page, how to get the server/managed server details which are weblogic cluster environment?

232 views Asked by At

In weblogic, we have cluster environment having 6 managed servers(all are up and running).

whenever i'm accessing application url i wanted to know request is going to which manged server(by using inspect element or any other way),

To know the server details is their any configuration we have to do in weblogic,application/ any other to archive this.

basically i have to check the managed server logs based on that user logged.

Thanks in advance.

1

There are 1 answers

0
Cedric On

To display the server name in a jsf OutputText you can build the following property in your Java bean :

private String currentWeblogicServerName;
public String getCurrentWeblogicServerName(){
    String managed = System.getProperty("weblogic.Name");
    return managed;
}

public String setCurrentWeblogicServerName(String CurrentWeblogicServerName){
    this.currentWeblogicServerName= CurrentWeblogicServerName;
}

and in your jsf page something like :

<af:outputText value="#{YOUR_BEAN_SCOPE.YOUR_BEAN_NAME.currentWeblogicServerName}" id="ot1"/>

If you only want to see it in "inspect element" add the property visible="false" to your outputText. (and search for the ot1 id in the inspect element console)