Apache Tomcat
Please refer to the Proposed Directory Structure section in this document for assistance with the steps below.
Basic Configurations
-
Go to
<absolute-path-to-tomcat>/bin.
-
Open (or create if it doesn’t already exist)
setenv.sh
(Linux) orsetenv.bat
(Windows) file. -
Set options (the property file can use any name):
- On Linux:
JAVA_OPTS="-javaagent:/opt/waratek/agent/waratek.jar -Dcom.waratek.OceanicProperties=/opt/waratek/conf_*/<name of property file> $JAVA_OPTS"
- On Windows:
set JAVA_OPTS=-javaagent:<absolute-path-to-agent-home-folder>\agent\waratek.jar -Dcom.waratek.OceanicProperties=<absolute-path-to-agent-home-folder>\<conf_*>\<name of property file> %JAVA_OPTS%
-
Restart the Tomcat server. The server must be restarted for the changes to take effect.
Launch Apache Tomcat as a Service in Windows
Running as a Windows Service
-
Go to
<absolute-path-to-tomcat>\bin.
-
Open the
Tomcat<version_number>w.exe
file. -
In the Monitor Tomcat GUI, check that the Service Status is Stopped.
-
In the Java Options field add:
-javaagent:<absolute-path-to-agent-home-folder>\agent\waratek.jar
-Dcom.waratek.OceanicProperties=<absolute-path-to-agent-home-folder>\<conf_*>\<name of property file>Leave any existing Java options unmodified (e.g. -Dcatalina.home, -Dcatalina.base, -Djava.endorsed.dirs, -Djava.io.tmpdir, -Djava.util.logging.manager, -Djava.util.logging.config.file).
-
Click Apply.
-
Go to the General tab, start the Tomcat service to have the changes take effect.