I couldn't find any definitive and organized resources on upgrading Tomcat in XAMPP but found many people are asking, so I thought it best to share the steps I took. For this guide, I will be using XAMPP 7.4.8 on Windows 10, which comes packaged with Tomcat 7.0.105, and upgrading to Tomcat 9.0.37. While I have not tested the following with other versions of XAMPP and Tomcat, this guide should cover most (if not all) versions. This guide assumes you have already downloaded and installed XAMPP on your OS of choice.
%XAMPP_DIR%
).
E.g., C:\xampp
.tomcat
.apache-tomcat-[VERSION]
to
%XAMPP_DIR%\tomcat
(the folder you deleted).By default, XAMPP will point towards the Tomcat version it was bundled with. You need to configure it so it will search for the new version you've install.
%XAMPP_DIR%\xampp-control.ini
.[BinaryNames]->Tomcat
to match the version you are using.
E.g., tomcat9.exe
(just the major version number).[ServiceNames]->Tomcat
to match the version
you are using, but it is not required. E.g., Tomcat9
.If you plan on running Tomcat as a standalone service, edit
%XAMPP_DIR%\catalina_service.bat
. Just search for the term tomcat
and replace values as needed.
Do not forget to enable JMX if you need it. I just add the following
line near the top of %XAMPP_DIR%\tomcat\bin\catalina.bat
:
set CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8008 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false