To instrument applications on Apache Tomcat, add the Java Agent JAR location as a Catalina environment, or CATALINA_OPTS variable.
Instrument Apache Tomcat
Open (or create if it doesn't already exist) the setenv.sh (Linux) or setenv.bat (Windows) file. For Tomcat 6 and later, you can put the file in the CATALINA_BASE/bin directory. For previous versions of Tomcat, put the file in the CATALINA_HOME/bin directory
Add the -javaagent argument to the file as a Catalina environment variable, as follows:
Instrument Tomcat When Running as a Windows Service
When running Tomcat as a Windows service, add the javaagent argument to your Tomcat startup properties. These instructions apply to Apache Tomcat >= 6.x.
To install the Java agent in Tomcat running as a Windows service:
Ensure that you are using administrator privileges.
Run the Apache tomcat<version>w.exe utility to configure your tomcat service to load the appdynamics agent (where <version> represents the major version number of the tomcat being instrumented).
For example:
tomcat8w //ES//<servicename>
CODE
Click the Java tab and in the Java Options add:
-javaagent:"<agent_home>\javaagent.jar"
CODE
Restart the Tomcat service to have the changes take effect.