Specifying Which Deployment Options to Support for Apache Tomcat Servers
InstallAnywhere 2024 R2
When you are configuring a Tomcat server host in your project, you can specify which types of deployment options you want your installer to support. You can offer all or any combination of the following options:
• | Local Tomcat server—The Web application is deployed to the server on which the installer is running. |
• | Remote Tomcat server—The installer runs on one machine and connects to a separate Tomcat server to deploy the Web application. |
Note that the remote Tomcat server must be running at the time of deployment. In addition, the Tomcat Manager application on that server must be deployed with all of the appropriate roles and permissions, and autodeployment functionality must be enabled.
To test deployment to a remote Tomcat server, add the following child elements to the <tomcat-users> element of the tomcat-users.xml file (which is in the conf folder in the Tomcat install location). Substitute the user name and password as needed. Use the same credentials when specifying the remote Tomcat server information during the installation.
<role rolename="manager-script" />
<user username="MyUserName" password="MyPassword" roles="manager-script"/>
Also note that when the product is uninstalled, the uninstaller does not remove the Web application resources from the remote Tomcat server.
• | Save the WAR file locally on the machine on which the installer is running for later deployment. |
Note that the installer saves the WAR file in the following location:
$USER_INSTALL_DIR$/_$PRODUCT_NAME$_installation/tomcat_undeployed_war
When the product is uninstalled, the uninstaller removes the undeployed WAR file from that location.
To specify which deployment options that you want your installer to support:
1. | In the Advanced Designer, on the Organization page, click Hosts. The Hosts view opens. |
2. | In the Host List, click the Tomcat server host that corresponds with the server that you want to configure. |
3. | At the bottom of the view, in the Deployment Options area, select the check box of each option that you want your installer to support. Available options are: |
• | Local Tomcat |
• | Remote Tomcat |
• | Save the WAR locally on the target system for later deployment |
Tip:As an alternative, you can configure deployment options when you click the Tomcat server host in the Install view on the Sequence page.
By default, InstallAnywhere uses the user-defined variable $TOMCAT_DEPLOYMENT_OPTION$ to indicate which option to use for deploying WAR files at run time. Valid values for this variable are:
Value |
Description |
1 |
Local Tomcat |
2 |
Remote Tomcat |
3 |
Save the WAR locally on the target system for later deployment |
You can use a run-time panel or console to enable end users to select which option that they want to use. As an alternative, you can add Set InstallAnywhere Variable actions to a sequence in your project to determine which option to use for deployment. To learn more, see Enabling End Users to Specify Apache Tomcat Server Information.
See Also