Detect the monitored app name

How to find the name of your application for referencing in the IAST configuration file.

When using the monitoredApp field in the configuration file to define which of the web applications on the server will be monitored by IAST, use these guidelines to find the application names.
Note: When an application name is derived from a filename that includes a crosshatch (#), ASoC replaces this symbol with a forward slash (/). For example, if the Tomcat file my#demo.war is deployed (see below), the application name will be my/demo

Tomcat

  • If using the auto-deploy feature in the webapps directory (recommended), the application name is the filename without the WAR extension. The name for demo.war is demo.
  • If using the XML file under CATALINA_BASE/conf/[engine name]/[host name], the application name is the filename without the XML extension. The name for demo.xml is demo.
  • If using context elements statically in a server.xml file, the application name is the path attribute value in the context element. Example:In this example the application name is mydemo/version1

Websphere

  • If using default context settings, the application name is derived from the WAR filename preceded by /. The name for demo.war is /demo.
  • If using an EAR file, the context path resides within it, in /WEB-INF/lib/application.xml. This file contains an XML element called context-root whose value is the application name.
  • If using a WAR file, the context path reside within it, in /WEB-INF/ibm-web-ext.xml. This file contains an XML element called context-root whose value is the application name.

Websphere-Liberty

The application name is the value of the content root, determined by the following rules:

Open-Liberty

  • If context root is defined in server.xml for the application, then the value of the contextRoot attribute of the webApplication element is the application name.
  • If not, then the application name is the name of the deployed application file, without its extension. The name for demo.war is demo.

Weblogic

  • If context root is defined in the descriptor file in either META-INF/application.xml or in WEB-INF/weblogic.xml, the application name is the value of context-root element in those files. If the values are different, the one in META-INF/application.xml takes precedence.
  • If not, then the application name is the name of the deployed application file, without its extension. The name for demo.war is demo.

Wildfly

  • If context root is defined in the descriptor file in either META-INF/application.xml or in WEB-INF/ jboss-web.xml, the application name is the value of context-root element in those files. If the values are different, the one in META-INF/application.xml takes precedence.
  • If not, then the application name is the name of the deployed application file, without its extension. The name for demo.war is demo.