1. Home
  2. Knowledge Base
  3. Administration
  4. Instructions for Upgrading to Tomcat 9

Instructions for Upgrading to Tomcat 9

Tomcat 9 offers m-Power customers the latest security, performance, and stability improvements.

As such this document is designed to give system administrators step by step instructions on how to upgrade from Tomcat 7 to Tomcat 9.

Before we begin, please note these instructions are designed for standard 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

Windows Instructions

Uninstall existing Tomcat7 services

  1. Stop existing Tomcats
  2. Open CMD mode as Administrator
  3. Navigate to C:\program files\mrc\development\m-power\tomcat\bin
  4. Type service remove TC7DEV
  5. Navigate to c:\program files\mrc\production\m-power\tomcat\bin
  6. Type service remove TC7PROD
  7. Repeat for any other services you may have installed

Install Tomcat

  1. Download the Windows version Tomcat 9 from mrc here
  2. Rename existing tomcat folder to tomcat 7
  3. Unzip downloaded file into c:\program files\mrc\development\m-power\. When completed you should have a c:\program files\mrc\development\m-power\tomcat folder
  4. Move tools.jar from tomcat7\lib to tomcat\lib
  5. If you connect to MSSQL or MySQL, move over the necessary jar files from tomcat7\lib to tomcat\lib
  6. Examine server.xml in ..\tomcat7\conf. Specifically, note the shutdown port, connector port, and contexts. Ensure these changes are made within the server.xml in tomcat\conf.


Repeat the above process for your production instance (as well as any other instances you may have).

The “/webapp/mrc” context is only used in your development environment, therefore you should only have the “/mrcjava” context at the bottom of the server.xml file for your production instance(s).

Install Tomcat9 as a service

  1. Open CMD mode as Administrator
  2. Navigate to c:\program files\mrc\development\m-power\tomcat\bin
  3. Type service install TC9DEV
  4. Type tomcat9w //ES//TC9DEV
  5. In the Java tab set the JVM to the appropriate jvm.dll (found in a path similar to C:\Program Files\Java\jdk1.8.X_XX\jre\bin\server\jvm.dll
  6. In Java options, add the following:
    -Xmx512m
    -Xms512m
    (Change the above to match your usage needs)
  7. Be sure that the Initial Memory Pool, Maximum memory pool, and Thread stack size inputs are all empty
  8. Back in the general tab. ensure that the startup type is Automatic
  9. Press Start

Repeat the above process for your production instance (as well as any other instance you have)

Linux Instructions

  1. Download the Linux version of Tomcat 9 from mrc here
  2. Stop Existing Tomcat
  3. Rename existing Tomcat folder to Tomcat 7
  4. Unzip downloaded file into /m-power. When completed you should have an m-power/tomcat/ folder
  5. Move tools.jar from tomcat7/lib to tomcat/lib
  6. If you connect to MSSQL or MySQL, move over the necessary jar files from tomcat7/lib to tomcat/lib.
  7. Examine the server.xml in …/tomcat7/conf. Specifically, note the shutdown port, connector port, and contexts. Ensure these changes are made within the server.xml in tomcat/conf
  8. Ensure that the permission set to /tomcat/bin/catalina.sh allows this file to be executable

Once completed, repeat these steps for any other Tomcat instances you may running on the server (ie….development, UAT, production, etc)

Troubleshooting

  • If Tomcat does not start, check the logs and see if it is complaining about duplicate entries in your web.xml file. If so, rename your /mrcjava/WEB-INF/web.xml to web7.xml. Then download this blank web.xml file into /mrcjava/WEB-INF/web.xml. Finally, run the conversion process located in /m-power named update-webxml.bat (as an Administrator) to populate the file.
  • Any custom entries you made your web.xml will not be brought over in the conversion process. Instead, manually copy and paste the specific entries from web7.xml to web.xml.
  • If you have any nightly processes that automatically restart Tomcat, ensure they are pointing at the new job name (applicable on windows)
Updated on January 25, 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