1. Home
  2. Knowledge Base
  3. Administration
  4. Upgrading to Tomcat 10 and JDK 17

Upgrading to Tomcat 10 and JDK 17

This document is designed to give system administrators step by step instructions on how to update to Tomcat 10 and JDK 17.

Before we begin, please note these instructions are designed for standard Windows installations. If you are utilizing any of the following, please consider engaging m-Power in a services agreements for us to do this conversion for you as we are familiar with these types of customized solutions:

  • Load Balancing
  • Clustering
  • SSL
  • mod_jk to communicate between Tomcat/Apache
  • Custom Contexts
  • Reverse Proxies

Step 1: Update m-Power

Download and install the October 2024 version of m-Power (or later) from here.

Before signing into the interface and applying the update, follow the next steps.

Step 2: Install JDK 17

  1. Download JDK 17 from Amazon Corretto.
  2. Run the Corretto installer.
  3. Restart the server.

Step 3: Active Directory Authentication File (optional)

If using Active Directory authentication, download the Integrated Security authentication file here and install in the following locations:

  • C:\Program Files\Amazon Coretto\jdk17.X.XX_X\bin\
  • C:\Program Files\Amazon Coretto\jdk17.X.XX_X\lib\

(Use the directory where the java folder is set up on your server)

Step 4: Remove Tomcat 9 Services

  1. Stop existing Tomcat services.
  2. Open CMD mode as Administrator.
  3. Navigate to C:\Program Files\mrc\development\m-power\tomcat\bin.
  4. Type service remove TC9DEV
  5. Navigate to C:\Program Files\mrc\development\m-power

If upgrading from Tomcat 7, reference TC7DEV instead of TC9DEV.

When removing the production Tomcat service, the service name is TC9PROD.

Step 5: Install Tomcat 10

  1. Download the Windows version of Tomcat 10 from mrc here.
  2. Rename the existing \mrc\development\m-power\tomcat folder to tomcat9.
  3. Unzip the downloaded files into C:\Program Files\mrc\development\m-power. When completed you should have a C:\Program Files\mrc\development\m-power\tomcat folder.
  4. If you connect to MSSQL or MySQL, move over the necessary driver jar files from \tomcat9\lib to \tomcat\lib.
    drivers

    If you connect to MSSQL and coming from JDK 8, please follow the additional required steps for Installing a New JDBC Driver and Configure m-Power SQL Server Properties.


  5. Examine the server.xml in \tomcat9\conf. Specifically, note the shutdown port, connector port, and contexts. Ensure these changes are made within the server.xml in the new \tomcat\conf folder.

    shutdown

    main

    mapped

Production Specific server.xml Settings

  1. Towards the very bottom of the file, remove the entire “/webapp/mrc” context from the production server.xml. This context is only used for development environments and will cause problems in a production environment.
  2. Confirm the “/mrcjava” context is pointing to the correct production folder in the docBase parameter.
  3. Set the reloadable property to “false“.

Tomcat 10 SSL Configuration (optional)

Tomcat 10 has a new setup for configuring SSL in the server.xml file. Find the main connector port and move the highlighted parameters into the nested SSLHostConfig tag as seen in the below screenshot.

Step 6: Install Tomcat 10 Services

  1. Open CMD mode as Administrator.
  2. Navigate to C:\Program Files\mrc\development\m-power\tomcat\bin
  3. Type service install TC10DEV and press Enter.
  4. When the service is installed, type tomcat10w //ES//TC10DEV and press Enter.
  5. In the General tab, ensure that the startup type is Automatic.
  6. In the Java tab set the JVM to the appropriate jvm.dll (found in a path similar to C:\Program Files\Amazon Corretto\jdk17.0.X_X\bin\server\jvm.dll
  7. Back in the General tab, press Start.

When installing the production Tomcat service, the service name should be TC10PROD.

Step 7: Convert Apps to use Tomcat 10

  1. Open CMD mode as Administrator.
  2. Navigate to C:\Program Files\mrc\development\m-power\tomcat\lib.
  3. Run the following command java -jar jakartaee-migration-1.0.8-shaded.jar "C:\Program Files\mrc\development\m-power\mrcjava\WEB-INF\classes" "C:\Program Files\mrc\development\m-power\mrcjava\WEB-INF\classes-out"
  4. Rename the \m-power\mrcjava\WEB-INF\classes folder to classes_tc9.
  5. Rename the \m-power\mrcjava\WEB-INF\classes-out folder to classes.
  6. Restart development Tomcat.

Step 8: Apply Update

Sign into the m-Power Development interface and click “Apply Update” when prompted.

Step 9: Production/Other Tomcat Environments

Repeat above steps 1 and 4-7 for your production environments (or any other Tomcat environments you have).

Be sure to substitute any path reference of ‘development’ with the appropriate environment.

Non-Windows Installations

For Linux/iSeries m-Power installations, the steps are generally the same as above:

  1. Update to the October 2024 version of m-Power (or later) from here.
    • Follow all of the next steps prior to signing into the interface to apply the update.
  2. Download and run the appropriate JDK 17 installer for your server.
  3. Restart the server after installing.
  4. Follow the above steps to Install Tomcat 10.
  5. Follow the above steps to Convert Apps to use Tomcat 10.
    • Note: Navigate to your specific m-power folder as you will not have a C:/Program Files directory

Updated on November 20, 2024

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support