Determining your version of Tomcat (1033932)
search cancel

Determining your version of Tomcat (1033932)

book

Article ID: 297360

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

This article contains directions for determining the exact version of Tomcat you have installed, so that you can determine what features/bugs/fixes are present. The version is not always obvious, particularly if Tomcat is repackaged as part of another product. These directions enable you to find a Tomcat version number at least as specific as x.y.z, as well as other relevant information.

Environment


Resolution

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:

  • Pivotal tc Server on Linux:

    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.

     
  • Apache Tomcat on Windows:

    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.