# 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>
     ```

     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfbEdPDvO4i1Ftqg5ZD5i6mgTaDqtsHJOVb9V5wXkwj0BjFEMjjBd15nFNrp8FWfsU66htpECZpBqlQ9rPKiDl3YvLwnl3QglAQ28WgFrq_qCuZueCZM99Ewu2L2EvMnYBirn4lKA?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>
   * **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<br>

2. **Stop the Tomcat 9 Service**
   * Open the Windows Services console (`services.msc`).
   * Locate the Tomcat 9 service.\
     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfIgBh1cEf0dLTdHqnrFPox_f--1uv-11uOqkVNn8qmk67nLg0nzUq9RV6g5E5D-Rt7cewtbxO2n68aW4CIBgVgar4YwRLJI3-UN8s9zRrwaXEr_ozfMr9d0xs5DfRhj41L3GzuEw?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>
   * Right-click and select **Stop**.<br>

3. **Download Tomcat 10 - Latest**
   * Navigate to the [Tomcat 10 download archive.](https://archive.apache.org/dist/tomcat/tomcat-10/)
   * Download the latest stable `.zip` package.\
     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfKPTSVm_fN5haDkBDSlxzWM_2QOd8XTZhs8j9zFUjcuRHh3ySOEfB72BEYmFprRKPHO_cen-TjSTq-4LUjTVInywInh2h-C0spfcA8TiuGI1qBt6mh6L0XC-0OibjVZc1yiq6F?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>

4. **Extract Tomcat 10 - Latest**
   * Extract the downloaded ZIP file to a temporary location.\
     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeZMkmADFn6-qvCByGbZHWzSPJViF4C396bGzC_t76Ytu_L1ykWLIH_qoSSs1vwtrQSA6bbmwVkr7ISexUPu7AQ95IGhCV0KAHoPtU_w37_kBWUeOxQctFS_am-tsO8fUHr7TfehA?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>
   * Copy the extracted `apache-tomcat-10.x.xx` folder to:

     ```
     C:\Apache\Tomcat10
     ```

     (or another designated installation path).\
     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXddZv5o2yrBBEx1C-CkcsOYPV1A8ewggNWc3bOVyLVSaTuiFcn9qVKUK7WPRt6ChdJ2--7l7idlM3P7ZHXAdobdBv9ZvUhkpU8fND59F7iw_hCdHWo0bmr8Hfo256clgdKR2EMXHg?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>
   * Delete the ZIP file after extraction to save disk space.<br>

5. **Configure Tomcat 10 - Latest as a Windows Service**
   * Uninstall the existing Tomcat service using the command:

     ```
     service.bat uninstall <ServiceName>
     ```

     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdcjOtyqLntGSf6yWeuhmPSl9AKExAy4eupx9Y4zUyieGUMtuZREriNeujtHLIjOKdaDYNq3eBRe9T-NK_ZAzhWL9sEt-IUdlzoDpkHG0Tn7yjnWEl18KplwFZY23OmDe5JfskimA?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>
   * Install the new Tomcat 10 - Latest service:

     ```
     service.bat install tomcat10
     ```
   * Open the new Tomcat service configuration:

     ```
     tomcat10w.exe //ES//tomcat10
     ```

     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeaSGeTk3H6optHq_4m7v3eauYjGMqjkgybW9-UAg4zX7minfqktOVr9nU82xXWW1azW-q9uex1Rzg1cfKvTWhyMbZ18tZkCqRQNKbPenTONfLRc56XeWfX9BDR7x40G83iZ7Hmlw?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>
   * **In the Java tab, enter the following:**
     * JVM memory and parameter settings from Step 1
     * Required OvalEdge application parameters:

       <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Add the parameters below in tomcat9w, in the Java tab. Ensure you provide the correct encryption/decryption key and the correct properties file path.</p></div>

       ```
       -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
       ```

       \
       \&#xNAN;*Sample Reference Screenshot:*

       <div align="left"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfUU-SixnIB0P6OQTE8ubgzNLVDc-1fxnLG1s-pAYMJUStCwbGuwIjTNfLbniFEk4s0hG0E2iVXWHp_kMRKUn35Tub5P8kACebsrUfhlrGIQmbX0cEfgg3jrBnedrteHCldMbPH?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure></div>

6. **Update `server.xml` Configuration**
   * Open:

     ```
     <Tomcat10-Home>\conf\server.xml
     ```

     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeYBinPoOrqZXyeflmXie1fpm31Vr8vz2R-MXsBsaPJqULVTzVUo1nJPJojPlwNfcpzdazFDtxvGgKYovC6fONbegKpbx0FxnqP1sKBcfbOfZWHc2KBxXkruttlwYQkeHdUl5h0?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>
   * Replace or update the `<Connector>` element as follows:

     ```xml
     <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" />
     ```

     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeKb4JAJZAuCIvJxWjtp_l9-H3lbFef2Fjes3qIxzxnfTrfDNQRsr6JOxZbbLT_ihgVvtua7keKzFfnKuoeOVTJcoyBma34ys9X3tCy9JdpdbjhT2ZkS35Rk7lMjEzkKMsv84x4NA?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>

     <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Comment out the default connector to avoid conflicts.</p></div>
   * Verify and adjust:
     * Startup and shutdown ports
     * SSL connector configuration (if applicable)<br>

7. **Update `context.xml` Cache Configuration**
   * Open:

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

     ```xml
     <Resources cacheMaxSize="102400" />
     ```

     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeSj6nBSxndiLGmEfoFW07LeWHUgux1gQzW9wru4V7ci6WP-j5_o1zY9Z2KzHgVy_-FGR8hfJB9U4xBojtzDB5bu2HIVZ8bsbpvatnrajIqAFvNAEolk8XfANSWdkNW8gH8tFKu1g?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>

8. **Deploy Application WAR File**
   * Delete all folders from:

     ```
     <Tomcat10-Home>\webapps
     ```

     except `ROOT` (if default).\
     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcTtrO0gb5UGeSyd_O2AJx21QsdP9EYE1Q23a4A8jNb_VVBlHv1RccCf-CDJ81PNjEYvweA2qeuNu8BBOGnwisqRPApOjWFYefHCZBqIoyIo3zY_XRun51_qnGFhi3FWxQ2V93P_Q?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>
   * Copy `ovaledge.war` from the old Tomcat webapps folder to the new one:

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

     <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>For version-specific builds (e.g., OvalEdge 7.2), use the <code>.war</code> file provided by the OE Team.</p></div>

     \
     \&#xNAN;*Sample Reference Screenshot:*

     <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc7r1-iRIAAPIW3u_t2Ke5TwVdBnP6dCZwOAoJqMb6mR3LGP3El33H03L9rdJ-cOs6zX53P0B_iZQ6E0OrnphYWUj5zy_QutaXndanykfgHzCx8ePra0ZF2ih6bN-K1o1pdIda-7w?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>

9. **Start the Tomcat 10 - Latest Service**
   * Open the Services console (`services.msc`).
   * Locate **Tomcat10** service and start it.

     <figure><img src="/files/kzZ4zEA25xe2MANwyKiw" alt=""><figcaption></figcaption></figure>
   * 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
  ```

  \
  \&#xNAN;*Sample Reference Screenshot:*

  <figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfvzHN6bv9CR33-hXPccOwgFjtbycHOzXDEs1SfYTuWS-WVPKytEnIiss8fDfaYhZZrtdwRx_B11oDragFnMtyAZnG39aGz0buFIDhyx6uJTly4IcICi6Ce5jlE8GdipJO-6EGO5A?key=dH37KfIijy8Lo7ozS6mo3A" alt=""><figcaption></figcaption></figure>

## 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ovaledge.com/release8.1/deployment-and-maintenance/upgrade/tomcat-upgrade-from-9.x-to-10.1.x-windows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
