MANUAL INSTRUMENTATION
Supported Windows Version: The following configuration is tested on Windows 2016 Operating System. To manually configure the TomcatServer with VSP, follow the steps below:
Method 1: Script based startup:
-
Shut down Tomcat Server (if it is running) using the command:
-
%CATALINA_HOME%\bin\shutdown.bat
-
-
Create a file setEnv.bat in the directory %CATALINA_HOME%\bin. Add content below to the file:
@echo off
ECHO.%JAVA_TOOL_OPTIONS%| FIND /I "instrumentation.jar">Nul || (
set JAVA_TOOL_OPTIONS=%JAVA_TOOL_OPTIONS% -javaagent:"%VSP_HOME%"\iae-java\instrumentation.jar -Dvirsec_appcontextpath=<AppCollectiveID>
)
NOTE:
Ensure that <AppCollectiveID> mentioned above is replaced with the App Collective ID in the CMS Application Configuration section
-
Save the modified file setEnv.bat
-
Start the Tomcat Server using the command:
-
%CATALINA_HOME%\bin\startup.bat
-
Method 2: Tomcat Services based Startup:
-
If the Tomcat Server is running, shut down the server using Windows Services
Example Service Name: Apache_Tomcat-7
-
Navigate to the directory: %CATALINA_HOME%\bin
Example: D:\tomcat-7.0.85\bin
-
Open command prompt
-
Right-click on properties and procure the value of Service Name
Example: Apache_Tomcat-7
-
Edit the parameters of the service:
-
In the Java tab, modify the parameters, Java Options to add the Service Name (obtained in Step 4)
-
Add VSP JVM argument to Java Options as described below
-
Before Modification:
-
After Modification:
-Dcatalina.home=D:\tomcat-7.0.85
-Dcatalina.base=D:\tomcat-7.0.85
-Dignore.endorsed.dirs=D:\tomcat-7.0.85\endorsed
-Djava.io.tmpdir=D:\tomcat-7.0.85\temp
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=D:\tomcat-7.0.85\conf\logging.properties
-javaagent:c:\PROGRA~2\Virsec\iae-java\instrumentation.jar
-Dvirsec_appcontextpath=<AppCollectiveID>
NOTE:
Ensure that <AppCollectiveID> mentioned above is replaced with the App Collective ID in the CMS Application Configuration section
-
-
-
Start the Tomcat Server using Windows Services
Example Service Name: Apache_Tomcat-7