Tomcat How to find out running Tomcat version?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
The fastest way to find your running Tomcat version is to execute $CATALINA_HOME/bin/version.sh (or version.bat on Windows). This prints the exact version string, build date, and JVM details in a single command. Beyond the command line, there are several other methods available depending on whether you have shell access, a running Manager app, or need to check the version programmatically from within your application.
Method 1: The version.sh / version.bat Script
This is the most direct approach and works on any Tomcat installation where you have shell access.
On Unix/Linux/macOS:
On Windows:
Typical output looks like this:
If CATALINA_HOME is not set, you can find it by checking where Tomcat is installed. Common locations include /opt/tomcat, /usr/share/tomcat, or /usr/local/tomcat. On systems managed by a package manager, check with:
Method 2: The Manager Web Application
Tomcat ships with a web-based Manager application that displays version information alongside deployed applications.
- Open
http://your-server:8080/manager/htmlin a browser - Log in with a user that has the
manager-guirole - The top of the page displays the server version and JVM information
If you have not configured Manager access, add a user in $CATALINA_HOME/conf/tomcat-users.xml:
For the text-based status endpoint (useful for scripts and monitoring tools):
This returns an HTML page with the version in the title. For machine-readable output, use the text endpoint:
Method 3: Reading the MANIFEST.MF File
Every Tomcat distribution includes version metadata in the JAR manifest files. This is useful when the server is not running or when you need to verify the version of specific libraries.
Expected output:
You can also check the server info properties file directly:
This file contains:
Method 4: Programmatic Access from Java
When you need to check the version at runtime from within a deployed application, use the ServerInfo utility class:
From a servlet context, you can also retrieve the version through the ServletContext:
This works regardless of the container, making it useful for applications that may run on Tomcat, Jetty, or other servlet containers.
Method 5: Check via Docker or Process Inspection
In containerized environments, the Tomcat version is usually part of the image tag:
If you only have process-level access, check the classpath or command-line arguments:
Comparison of Methods
| Method | Requires Running Server | Shell Access Needed | Output Detail | Best For |
version.sh / version.bat | No | Yes | Full (version, JVM, OS) | Quick command-line check |
| Manager Application | Yes | No (browser) | Moderate | Remote servers with Manager enabled |
| MANIFEST.MF / ServerInfo.properties | No | Yes | Version string only | Offline verification, CI pipelines |
Programmatic (ServerInfo) | Yes | No | Full | Runtime checks within applications |
| Docker / process inspection | Depends | Varies | Image tag or classpath | Containerized deployments |
Why Knowing the Version Matters
Tomcat versions determine which security patches, servlet API versions, and Java compatibility you have. The mapping between Tomcat major versions and specifications is worth knowing:
| Tomcat Version | Servlet Spec | JSP Spec | Java Minimum |
| 10.1.x | 6.0 | 3.1 | Java 11 |
| 10.0.x | 5.0 | 3.0 | Java 8 |
| 9.0.x | 4.0 | 2.3 | Java 8 |
| 8.5.x | 3.1 | 2.3 | Java 7 |
Running an outdated minor version within a major line means missing security fixes. Apache publishes CVEs tied to specific version ranges, so knowing your exact version is the first step in any vulnerability assessment.
Common Pitfalls
- CATALINA_HOME not set. The
version.shscript depends on this variable. If it is not exported, the script fails silently or prints an error. Set it explicitly or navigate to the Tomcat installation directory before running the script. - Manager app not configured. By default, Tomcat ships with no Manager users. Without adding a user with the
manager-guirole, the Manager endpoint returns a 401 or 403. - Confusing the installed version with the running version. If multiple Tomcat installations exist on the same machine,
version.shreports the version of the installation you point it at, not necessarily the one currently serving traffic. Cross-reference with the running process. - INFORMATION_SCHEMA confusion with MANIFEST.MF. The
catalina.jarmanifest may not exist in repackaged or embedded distributions (like Spring Boot's embedded Tomcat). For embedded Tomcat, check the dependency version in your build tool instead. - Relying on the server header. Tomcat can be configured to suppress or customize the
ServerHTTP response header via theserverattribute inserver.xml. Do not depend on it for version identification.
Summary
- Run
$CATALINA_HOME/bin/version.shfor the fastest command-line version check. - Use the Manager application at
/manager/text/serverinfofor remote or scripted checks. - Read
MANIFEST.MForServerInfo.propertieswhen the server is not running. - Use
ServerInfo.getServerInfo()for programmatic runtime version detection. - Always verify the running instance's version, not just the installed files, especially when multiple Tomcat installations coexist.
- Keep your Tomcat version current within its major line to stay ahead of published CVEs.
Related reading
- Tracing versus Logging and how does log4net fit in?
- Tracing XML request/responses with JAX-WS
- Tradeoff between building own distributed system and using kubernetes to deploy my application
- Traefik Forward Authentication in k8s ingress controller
- Tomcat takes too much time to start - Java SecureRandom
- Tomcat threads vs Java threads
- Training a Neural Network in Python and deploying in C
- Trick to loop/autorefresh docker ps view like top/htop in bash

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.