Skip to content
  • There are no suggestions because the search field is empty.

Update Apache Tomcat

Step-by-step guide to update Apache Tomcat.

This is a guide for manually updating Apache Tomcat on a Windows system, specifically addressing the configuration of Tomcat 9 Core for Innoslate-related web applications. It is important to note that testing has only been performed up to Apache Tomcat 9; subsequent versions have not yet been validated for compatibility with Innoslate.

To proceed, please follow the detailed steps outlined below for downloading, configuring, and updating Tomcat manually.

Prerequisites

  • Administrative Access: You must have administrative privileges on the machine Innoslate is installed.

  • Java Development Kit (JDK): A compatible JDK, such as JDK 8 or Amazon Corretto 17, must be installed.

  • Backup of Tomcat Installation: It is strongly recommended to create a backup of your existing Apache Tomcat installation and associated web applications. This is critical if your Apache Tomcat instance is configured for SSL or specific port settings in the Server.xml file.

Step-by-Step Guide

1. Download Tomcat

Visit the official Apache Tomcat website and download Tomcat 9 Core. as an example, we’ll use apache-tomcat-9.0.100-windows-x64.

URL: https://tomcat.apache.org/download-90.cgi
Extract the downloaded ZIP file to the location of your choice (e.g., `C:\Tomcat`).

2. Rename the Tomcat Folder

Rename the extracted folder (e.g., `apache-tomcat-9.0.100`) to `apache-tomcat`. 
Example: `C:\Tomcat\apache-tomcat`.

3. Configure the `webapps` Folder

Navigate to the `webapps` folder inside your Tomcat directory (e.g., C:\Tomcat\apache-tomcat\webapps).

Delete all existing contents in the `webapps` folder to start fresh.

Add the following:

  •   `innoslate4` folder (your Innoslate web application)
  •   `socket` folder (if required for your setup)
  •   `integrations` folder (optional, depending on your configuration)
  •   `setup.war` file (the Innoslate setup WAR file)
These components will be deployed automatically when Tomcat starts.

 

4. Update the `service.bat` File

Navigate to the `bin` folder (e.g., `C:\Tomcat\apache-tomcat\bin`).

Open `service.bat` in a text editor with administrative privileges.

Modify the following lines to adjust memory settings and service configuration:

Lines 213 and 214: Set the initial (`JvmMs`) and maximum (`JvmMx`) JVM memory allocation to 4098 MB (adjust as needed for your system).


    if "%JvmMs%" == "" set JvmMs=4098
    if "%JvmMx%" == "" set JvmMx=4098

  - Line 226: Ensure the `--DisplayName` parameter reflects your service name. For example:


    --DisplayName "%SERVICE_NAME%" ^

Save and close the file.

5. Update the `server.xml` File

Navigate to the `conf` folder (e.g., `C:\Tomcat\apache-tomcat\conf`).

Open `server.xml` in a text editor.

Make the following changes:
Line 71 (Connector Configuration): Add the `maxSwallowSize="-1"` attribute to the `<Connector>` element to disable the swallow size limit (useful for larger uploads).

    <Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
               maxSwallowSize="-1" />

Before `</Host>` (at the bottom): Add a `<Context>` element to map the `innoslate4` application as the root context.

    <Context path="" docBase="innoslate4" debug="0" reloadable="true"></Context>

Save and close the file.

6. (Optional) Configure SSL

To enable secure connections using SSL via Apache Tomcat, additional configuration is required in the Apache Tomcat server.xml file. This includes enabling the HTTPS connector and specifying keystore settings.

  • If the Java KeyStore (JKS) file is located in the same directory as in your previous setup, you can copy the backed-up server.xml file into the conf folder of the new Apache Tomcat installation.

7. Update the Windows Service

  • Navigate to the `innoslate4\utilities` folder within your Tomcat installation or Innoslate directory.
  • Run the `update_innoslate_service.cmd` script as an administrator. This script updates the Windows service to use the new Tomcat installation with Innoslate.
  • Verify the service is updated by checking the Windows Services panel (`services.msc`) and ensuring the service name and path reflect your new Tomcat configuration.

Verification

  • Start the Tomcat service (e.g., via `services.msc` or the `startup.bat` file in the `bin` folder for testing).
  • Open a browser and navigate to `http://localhost:8080` (or your configured port) to confirm Tomcat is running.
  • Check that the `innoslate4` application is accessible at the root path (ex: `http://localhost:8080/`).

Troubleshooting Tips

  • If the Innoslate service fails to start, review error messages in the logs folder of your Apache Tomcat installation (e.g., C:\Tomcat\apache-tomcat\logs). Begin by examining the Innoslate4-stderr.x.x.x log file, where x.x.x corresponds to the date of the event. Common issues include:
    • Incorrect Java Development Kit (JDK) paths.
    • Insufficient memory allocated to the service.
  • Application Not Loading: Ensure the `innoslate4` folder and `setup.war` are correctly placed in `webapps` and that the `server.xml` is properly configured.

  • Port Conflicts: If port 8080 is in use, modify the `<Connector>` port in `server.xml` to an available port.