In this article, I presented a little utility based on the SimpleHTTPServer jython module to visualize into an HTML page a WebLogic server’s configuration and run-time mbeans. I also mentioned that there are lots other tools out there for this purpose, albeit more aimed at run-time monitoring rather than viewing the configuration mbeans. Here, I’d like show another such tool, actually a java package to install in the target JVM. As such, it is a bit more intrusive but not that much. The package is called HtmlAdaptorServer. It can be downloaded from Oracle as the archive and its library file jmxtools.jar added to the WebLogic server’s CLASSPATH. Once connected to the target’s JMX server as a JMX agent, it can be accessed from a browser through http on the specified port (default 8082) and the target’s run-time mbeans along with their properties can be displayed, and even edited if Read-Write. In addition, some mbeans methods can also be called.

Let’s see how to use it in the context of a WebLogic domain.


The installation is quick and easy: just download the archive from Oracle and extract its library jmxtools.jar:

# get the jmx v1.2.1 reference implementation;
export work_dir=~/HtmlAdaptorServer
mkdir $work_dir
cd $work_dir

# extract the relevant jar;
unzip -x ./ jmx-1_2_1-bin/lib/jmxtools.jar

Now, we need some code to connect the HTML Adaptor to the JMX server. It can also be run later as a stand-alone program, which is handy for testing it.

# save the class startHtmlAdaptor;
cat - <<eoj >
import com.sun.jdmk.comm.HtmlAdaptorServer;

public class startHtmlAdaptor{
  public static void main(String[] args) {
     int HtmlAdaptorPort;
     System.out.println("In startHtmlAdaptor ... ");
     MBeanServer mbean_server = ManagementFactory.getPlatformMBeanServer();
     try {
         if (args.length >= 1)
            HtmlAdaptorPort = Integer.parseInt(args[0]);
            HtmlAdaptorPort = 8082;
         HtmlAdaptorServer adapter = new HtmlAdaptorServer();
         ObjectName adapterName = new ObjectName("com.HTMLbrowsing.jmx:name=htmladaptor,port=" + HtmlAdaptorPort);
         mbean_server.registerMBean(adapter, adapterName);
         System.out.println("starting HTML Adaptor agent on port " + HtmlAdaptorPort);
     } catch (Exception e) {

# let's compile it;
export CLASSPATH=.:`pwd`/jmx-1_2_1-bin/lib/jmxtools.jar


In order to test it, let’s simply execute it. It will connect to its own JVM’s JMX server:

$ java -cp .:jmxtools-1.2.1.jar startHTMLAgent 8881
starting the JMX agent... 
starting HTML browsing on port 8881

Point your browser on http://localhost:8881. You’ll see the agent view below:

You can move around and notice that some properties are read-only while some others are read-write. Also, methods are presented that can be given parameters, if needed, and invoked.

Installation in a WebLogic domain

If the stand-alone agent works well, let’s move on with the installation in a WebLogic server. For our test, we’ll use the demo WebCenter domain available from Oracle as a downloadable VM. This domain uses WebLogic 12.2.1 and contains 3 managed servers in addition to the administration server. We’ll install the HtmlAdaptorServer JMX agent as a startup class so it connects to the each server’s JMX server and instrumentalize it. As it is a bit boring to manually edit the configuration from the administration console, let’s use the scripting tool wlst do do that by just copying and pasting the statements below:

# install it and the jmxtool in wl domain, here webcenter for testing;
export DOMAIN_BASE=/oracle/domains
export DOMAIN_HOME=${DOMAIN_BASE}/webcenter
export APPLICATIONS_HOME=${DOMAIN_BASE}/applications/webcenter
cp startHtmlAdaptor.class ${APPLICATIONS_HOME}/.
cp jmx-1_2_1-bin/lib/jmxtools.jar ${APPLICATIONS_HOME}/.

# start wlst;
. bin/

# connect to the administrative server;
connect('weblogic', 'welcome1', 't3://localhost:7001/console')

# install the startup class on all the 4 servers to browse with distinct adaptor ports starting with 6000 and up to 6003;
# for the AdminServer;
create('startHtmlAdaptor-AdminServer', 'StartupClasses')

# for the IBR_server1;
create('startHtmlAdaptor-IBR_server1', 'StartupClasses')

# for the UCM_server1;
create('startHtmlAdaptor-UCM_server1', 'StartupClasses')

# for the WC_Portal;
create('startHtmlAdaptor-WC_Portal', 'StartupClasses')

# save and exit;

The stand-alone program above must now be added to the domain’s CLASSPATH so it can be accessed. We use the domain’s script for it is sourced automatically by the other WebLogic scripts of the domain when they are executed.

# add the new class startHtmlAdaptor.class to the CLASSPATH;
cat - >> ${DOMAIN_HOME}/bin/

Restart the domain using whatever wrappers you have configured. This is perhaps the most customized area of WebLogic administration ! The out of the box,, and in ${DOMAIN_HOME}/bin can be used too.

Testing in the WebLogic domain

Once the domain has started, point your browser to each one of the agents listening on http://localhost:600[0-3] and check the information they obtain from their respective server. Here is the administration server’s agent view:

Here is an exemple for the mbean Security_Name=myrealmDefaultIdentityAsserter running in the managed server IBR_server1’s JMX agent accessible here: http://localhost:6001/ViewObjectRes//Security%3AName%3DmyrealmDefaultIdentityAsserter.

This can be compared with the view from SimpleHTTPServer presented in the aforementioned article and accessible here for example:

We notice that clicking on a property of MBean pops up its description. Also, a list of the current MBean’s operations are displayed at the bottom and can be invoked, some are parameterless and some requires one or more parameters.
Referenced mbeans can be digged further by clicking on their value displayed in the rightmost column, e.g. for the Realm mbean :


The HtmlAdaptorServer agent presents a nice HTML interface to the run-time mbeans. Unlike a stand-alone tool such as jconsole, it requires to be installed in the servers to observe but this step is quite smooth. It is a tool aimed mostly at developers who need to interactively troubleshoot their mbeans in development where they can change some properties if needed.