[Gukulkan]

Learn, develop, play.

Config JMX in Tomcat

To make enable JMX in Tomcat edit startup.but file and add following line


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"

Configuration Multiple Tomcat Instances

To configure Tomcat multi instances in Windows , you have to download this Tomcat.
Take version 8

Copy everything from the archive (for example ) to C:\tomcat\apache

In the C:\tomcat\apache create two folders “servera” and “serverb”

Now folders conf, logs, temp, webapps, work copy to
C:\tomcat\apache\ servera and C:\tomcat\apache\ serverb
and remove from C:\tomcat\apache

Now go to C:\tomcat\apache\serverb\ conf and open for editing.

All ports ( labeled as port = ****) rises to 1. Example , port = 8080 change to port = 8081

Go to the folder C:\tomcat\apache\bin
Here we have to make two copies of startup.bat: startup-a.bat and startup-b.bat

Open this 2 files and after rows
rem ---------------------------------------------- -----------------------------
rem Start script for the CATALINA Server
rem ------------------------------------------------- --------------------------

setlocal

add variables
set “CATALINA_BASE = C:\tomcat\apache\servera” – for the server a
set “CATALINA_BASE = C:\tomcat\apache\serverb” – for the server b

After this, run two of these files , and we have 2 instance.

Check Tomcat version

Sometimes we need to check our Tomcat version
It’s very simple, you should to find in the bin folder and run version.bat (Windows) / version.sh (Linux)

And see:


Using CATALINA_BASE: "C:\tomcat\apache-tomcat-8.0.5-1"
Using CATALINA_HOME: "C:\tomcat\apache-tomcat-8.0.5-1"
Using CATALINA_TMPDIR: "C:\tomcat\apache-tomcat-8.0.5-1\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0\jre"
Using CLASSPATH: "C:\tomcat\apache-tomcat-8.0.5-1\bin\bootstrap.jar;C:\tom
cat\apache-tomcat-8.0.5-1\bin\tomcat-juli.jar"
Server version: Apache Tomcat/8.0.5
Server built: Mar 24 2014 05:29:50
Server number: 8.0.5.0
OS Name: Windows 7
OS Version: 6.1
Architecture: amd64
JVM Version: 1.8.0-b132
JVM Vendor: Oracle Corporation