x.y.z
, as well as other relevant information.Resolution
Get version information directly from the Tomcat code by executing this command in the Tomcat install directory:
Linux: java -cp lib/catalina.jar org.apache.catalina.util.ServerInfo
Windows: java.exe -cp lib\catalina.jar org.apache.catalina.util.ServerInfo
Note: The version of Java used in this command may depend on how you have installed Java on your system, and is reflected in the output. To indicate a specific version of Java, specify the full path to the Java executable in the command.
The output varies depending on the product and environment.
Also note that there might be already a tomcat-x.x.x.x/bin/version.{sh,bat} script that you can run to get the tomcat version info.
Examples:
Server version: Pivotal tc Runtime 3.1.11.RELEASE/8.5.32.A.RELEASE
Server built: Jul 6 2018 15:53:13 UTC
Server number: 8.5.32.0
OS Name: Linux
OS Version: 2.6.18-194.11.1.el5
Architecture: i386
JVM Version: 1.6.0_21-b06
JVM Vendor: Sun Microsystems Inc.
Server version: Apache Tomcat/6.0.32
Server built: February 2 2011 2003
Server number: 6.0.32.0
OS Name: Windows XP
OS Version: 5.2
Architecture: amd64
JVM Version: 1.6.0_19-b04
JVM Vendor: Sun Microsystems Inc.
The immediately relevant field in the output is Server number
, which indicates the exact version of Tomcat, even in a derived product like Pivotal tc Server. All of the output can be helpful information for troubleshooting.