Bootstrap FreeKB - Tomcat - Version Release
Tomcat - Version Release

Updated:   |  Tomcat articles

When installing Tomcat, you will install a certain version, such as 8.5.38 or 9.0.0. After starting Tomcat, the ${tomcat_install_root}/logs/catalina.out file should contain the version of Tomcat, like this.

dd-mm-yyyy hh:mm:ss.sss INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Tomcat Runtime 8.5.38.B.RELEASE

 

The version.sh script can be used to return the version of Tomcat.

~]# <base tomcat directory>/bin/version.sh
Using CATALINA_BASE:   /opt/Tomcat
Using CATALINA_HOME:   /opt/Tomcat
Using CATALINA_TMPDIR: /opt/Tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /opt/Tomcat/bin/bootstrap.jar:/opt/Tomcat/bin/tomcat-juli.jar
Server version: Apache Tomcat/7.0.25
Server built:   Jan 17 2012 09:53:06
Server number:  7.0.25.0
OS Name:        Linux
OS Version:     2.6.32-754.29.2.el6.x86_64
Architecture:   amd64
JVM Version:    1.8.0_252-b09
JVM Vendor:     Oracle Corporation

 

Or, the catalina.sh script can be used.

~]# <base tomcat directory>/bin/catalina.sh version
Server version: Apache Tomcat/9.0.36.redhat-8
Server built:   Jan 15 2021 13:27:47 UTC
Server number:  9.0.36.0
OS Name:        Linux
OS Version:     4.18.0-305.57.1.el8_4.x86_64
Architecture:   amd64
JVM Version:    1.8.0_282-b08
JVM Vendor:     Red Hat, Inc.

 

Let's say you have two or more installed Tomcat releases.

~]$ ls -l /opt/Tomcat
drwxr-sr-x.  5 tomcat webadmin   69 Feb 11 09:46 tomcat-8.5.98.A.RELEASE
drwxr-sr-x.  5 tomcat webadmin   69 Feb 11 09:44 tomcat-9.0.85.A.RELEASE

 

in this scenario, the tomcat.version file in your Tomcat application servers conf directory is often used to configure the Tomcat application server to use a certain version of Tomcat.

~]$ cat /opt/Tomcat/profiles/myJVM/conf/tomcat.version 
/opt/Tomcat/tomcat-8.5.98.A.RELEASE

 

Or, the ps command can be used.

 ~]$ ps -ef | grep -i myJVM | sed 's| |\n|g' | grep -i release
-Dcatalina.home=/opt/Tomcat/tomcat-8.5.98.A.RELEASE

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 42fd90 in the box below so that we can be sure you are a human.