Deploying Unica Plan on Apache Tomcat®

You must follow a set of guidelines when you deploy Unica Plan on Apache Tomcat.

Make sure that the version of Apache Tomcat meets the requirements that are described in the Unica Recommended Software Environments and Minimum System Requirements document. Use the following guidelines when you deploy Unica Plan on Apache Tomcat:

From the bin directory under your Apache Tomcat installation directory, locate or create the setenv.sh or setenv.bat script appropriate for your operating system in a text editor, and add or modify JAVA_OPTIONS property, and add the following entries. Use a space to separate entries.
  • -Dplan.home=<HCL_Unica_Home>\<Plan_Home>

    Where <HCL_Unica_Home> is the path to the top-level directory and <Plan_Home> is the path to the directory where you installed Unica Plan. Typically this directory is HCL_Unica/Plan.

  • -Dfile.encoding=UTF-8
  • Make sure that the following JVM parameters are present. If not add them:
    • -Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
    • -Dlog4j2.configurationFile=file:///<Plan_home>\conf\plan_log4j_12.0.xml
    • -Dlog4j.configuration=file:/// <Plan_home>\conf\plan_log4j_1x.xml
    Note:
    • In the -Dlog4j2.configurationFile=file:///<Plan_home>\conf\plan_log4j_12.0.xml setting, if you have customized the plan_log4j.xml and made some changes to suit your organization, then ensure that you make those settings in the plan_log4j.xml specified here as per the -Dlog4j2.configurationFile that we have deployed to you now. If you have used the plan_log4j_12.0.0.0.xml file, make your changes in that file.
    • In Windows, the file path contains a back slash. Whereas, in UNIX, it must contain a forward slash.
    • The path separator in the log4j configuration file name should be set as Windows style() or UNIX (/ ) style based on the underlying operating system.
    • Ensure that the parameter relaxQueryChars is present in the connector tag in conf/server.xml in tomcat

      <Connector port="7002" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" relaxedQueryChars="|,[,],\,`,{,},^" />

  1. Deploy the HCL plan.war file as an enterprise application on Tomcat Apache server.
    Note: Deployment of HCL EAR file is not supported in Tomcat.
  2. Complete the following tasks if your installation must support non-ASCII characters, for example for Portuguese or for locales that require multi-byte characters:
    1. Edit the setenv.sh file for the respective product instances script in the bin directory under your tomcat instances directory to add -Dfile.encoding=UTF-8 -Dclient.encoding.override=UTF-8 to JAVA_VENDOR.
    2. Restart Tomcat.
  3. If deploying in a production environment, you can add JVM heap setting for that tomcat instance in app-one/bin/setenv.sh file respectively for all the instances.