Tomcat Upgrade from 9.x to 10.1.x (Windows)

This document provides a step-by-step upgrade procedure for migrating Apache Tomcat 9.x to Tomcat 10.1.x on a Windows Server. The upgrade ensures compatibility with Java 17, preserves existing configurations, and integrates application-specific parameters. This procedure includes backup, setup, configuration transfer, validation, and rollback planning.

Prerequisites

Ensure the following conditions are met before proceeding with the upgrade:

  • Administrative privileges on the Windows Server

  • Java Development Kit (JDK) 17 is installed and configured (JAVA_HOME environment variable set appropriately)

  • Sufficient permissions to manage Windows services

  • Access to the ovaledge.war application package (if deploying OvalEdge)

  • Network access to application-specific file paths and encrypted keys

  • Backup tools or storage location for configuration preservation

Upgrade Procedure

  1. Backup Existing Configuration and Parameters

    • Navigate to the current Tomcat installation directory:

      <Tomcat9-Home>\bin
    • Open a Command Prompt and run:

      tomcat9w.exe //ES//<ServiceName>

      Sample Reference Screenshot:

    • In the Java tab, document or screenshot the following:

      • Java options and JVM memory settings

      • Paths to external configuration files

    • Backup the following files:

      <Tomcat9-Home>\conf\server.xml
      <Tomcat9-Home>\conf\context.xml
      • Any other custom configuration or .properties files

  2. Stop the Tomcat 9 Service

    • Open the Windows Services console (services.msc).

    • Locate the Tomcat 9 service. Sample Reference Screenshot:

    • Right-click and select Stop.

  3. Download Tomcat 10 - Latest

  4. Extract Tomcat 10 - Latest

    • Extract the downloaded ZIP file to a temporary location. Sample Reference Screenshot:

    • Copy the extracted apache-tomcat-10.x.xx folder to:

      C:\Apache\Tomcat10

      (or another designated installation path). Sample Reference Screenshot:

    • Delete the ZIP file after extraction to save disk space.

  5. Configure Tomcat 10 - Latest as a Windows Service

    • Uninstall the existing Tomcat service using the command:

      service.bat uninstall <ServiceName>

      Sample Reference Screenshot:

    • Install the new Tomcat 10 - Latest service:

      service.bat install tomcat10
    • Open the new Tomcat service configuration:

      tomcat10w.exe //ES//tomcat10

      Sample Reference Screenshot:

    • In the Java tab, enter the following:

      • JVM memory and parameter settings from Step 1

      • Required OvalEdge application parameters:

        Add the parameters below in tomcat9w, in the Java tab. Ensure you provide the correct encryption/decryption key and the correct properties file path.

        -DOVALEDGE_SECURITY_TYPE=db
        -DOVALEDGE_ENCRYPT_DECRYPT_KEY=<encrypt_decrypt_key>
        -Dext.properties.dir=file:C:/path/to/ovaledge/ext-prop/
        -Dlog4j.configuration=file:C:/path/to/ovaledge/ext-prop/log4j.properties
        --add-opens java.base/jdk.internal.loader=ALL-UNNAMED
        --add-opens jdk.zipfs/jdk.nio.zipfs=ALL-UNNAMED
        --add-opens java.base/java.net=ALL-UNNAMED
        --add-opens java.base/java.time=ALL-UNNAMED
        --add-opens java.base/java.nio=ALL-UNNAMED

        Sample Reference Screenshot:

  1. Update server.xml Configuration

    • Open:

      <Tomcat10-Home>\conf\server.xml

      Sample Reference Screenshot:

    • Replace or update the <Connector> element as follows:

      <Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"
        compression="on" useSendfile="false"
        noCompressionUserAgents="gozilla, traviata"
        compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript" />

      Sample Reference Screenshot:

      Comment out the default connector to avoid conflicts.

    • Verify and adjust:

      • Startup and shutdown ports

      • SSL connector configuration (if applicable)

  2. Update context.xml Cache Configuration

    • Open:

      <Tomcat10-Home>\conf\context.xml
    • Add the following line within the <Context> element:

      <Resources cacheMaxSize="102400" />

      Sample Reference Screenshot:

  1. Deploy Application WAR File

    • Delete all folders from:

      <Tomcat10-Home>\webapps

      except ROOT (if default). Sample Reference Screenshot:

    • Copy ovaledge.war from the old Tomcat webapps folder to the new one:

      copy C:\OldTomcat\webapps\ovaledge.war C:\Apache\Tomcat10\webapps\

      For version-specific builds (e.g., OvalEdge 7.2), use the .war file provided by the OE Team.

      Sample Reference Screenshot:

  2. Start the Tomcat 10 - Latest Service

    • Open the Services console (services.msc).

    • Locate Tomcat10 service and start it.

    • Ensure the service starts without errors.

Testing and Verification

  • Open a web browser and navigate to the application URL.

  • Confirm that the OvalEdge application loads successfully.

  • Validate key features and workflows to ensure application integrity.

  • Monitor Tomcat logs for any errors:

    <Tomcat10-Home>\logs\catalina.YYYY-MM-DD.log
    <Tomcat10-Home>\logs\localhost.YYYY-MM-DD.log

    Sample Reference Screenshot:

Rollback Plan

In the event of a failed upgrade:

  1. Stop the Tomcat 10 service.

  2. Remove the Tomcat 10 directory.

  3. Reinstall the Tomcat 9 service:

    <Tomcat9-Home>\bin\service.bat install <ServiceName>
  4. Restore previously backed-up configuration files.

  5. Restart the Tomcat 9 service and validate application functionality.


Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.

Last updated

Was this helpful?