Chapter 22 Monitoring and Managing Tomcat
To easily monitor and manage Tomcat, use the JMX Remote. The following lists the steps in enabling JMX Remote:
1. Add the following parameters to the Tomcat Startup Script:
set CATALINA_OPTS="-Dcom.sun.management.jmxremote\
-Dcom.sun.management.jmxremote.port=%my.jmx.port%\
-Dcom.sun.management.jmxremote.ssl=false\
-Dcom.sun.management.jmxremote.authenticate=false"
2. If authorization is good, you may add and change the following code:
-Dcom.sun.management.jmxremote.authenticate=true\
-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password\
3. Edit the acess allow file $CATALINA_BASE/conf/jmxremote.access:
monitorRole readonly
controlRole readwrite
To activate the JMX MX4J Http Adaptor with Java 1.4, follow these steps:
1. Install the Tomcat Compat Package.
2. Install mx4j-tools.jat in common/lib.
3. Configure the MX4J JMX HTTP Adaptor in the AJP Connector.
<Connector port="${AJP.PORT}"
handler.list="mx"
mx.enabled="true"
mx.httpHost="${JMX.HOST}"
mx.httpPort="${JMX.PORT}"
protocol="AJP/1.3" />
4. Start Tomcat and access http://${JMX.HOST}:${JMX.PORT}.
5. Control the access with the mx connector parameter mx.authMode="basic"mx.authUser="tomcat"mx.authPassword="strange".


