How to check Tomcat version Installed

To find out the Tomcat version, find this file – version.sh for *nix or version.bat for Windows. This version.sh file is normally located in the Tomcat bin folder.

For example :

mkyong@hcompass:/usr/share/tomcat7/bin$ ./version.sh 
Using CATALINA_BASE:   /usr/share/tomcat7
Using CATALINA_HOME:   /usr/share/tomcat7
Using CATALINA_TMPDIR: /usr/share/tomcat7/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar
Server version: Apache Tomcat/7.0.28
Server built:   Apr 8 2014 08:47:08
Server number:  7.0.28.0
OS Name:        Linux
OS Version:     3.15.4-x86_64-linode45
Architecture:   amd64
JVM Version:    1.7.0_55-b14
JVM Vendor:     Oracle Corporation

In this example, Tomcat version is 7.0.28

Note

If you are not sure where is the version.sh file, try this command :

sudo find / -name "version.sh"

Find out everything about Tomcat.

sudo find / -name "tomcat7"
Tags :

About the Author

mkyong
Founder of Mkyong.com and HostingCompass.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.

Comments

  • Noah Freedman

    MK Yong, your tomcat and hibernate tutorials have been invaluable to me. Thanks man!

  • NABIL Aal

    Thanks Mkyong,

    How about in Windows envirunment? what is the command to know the TOMCAT version?

    Thanks in advance
    NABIL

  • Kate

    Worth a try with our rather customised installation!

    tomcat@srv1:~/i/root/bin$ export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-sun.x86_64
    tomcat@srv1:~/i/root/bin$ ./version.sh
    Using CATALINA_BASE: /a/tomcat/i/root
    Using CATALINA_HOME: /a/tomcat/
    Using CATALINA_TMPDIR: /a/tomcat/i/root/temp
    Using JRE_HOME: /usr/lib/jvm/jre-1.6.0-sun.x86_64/
    Using CLASSPATH: /a/tomcat/i/root/bin/tomcat-juli.jar:/srv/tomcat//bin/bootstrap.jar
    Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/catalina/util/ServerInfo
    Caused by: java.lang.ClassNotFoundException: org.apache.catalina.util.ServerInfo
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: org.apache.catalina.util.ServerInfo. Program will exit.

  • Vikas Gupta

    Follow the below path

    /usr/local/apache-tomcat-6.0.18/bin/version.sh

    Will give below result:

    Using CATALINA_BASE: /usr/local/apache-tomcat-6.0.18
    Using CATALINA_HOME: /usr/local/apache-tomcat-6.0.18
    Using CATALINA_TMPDIR: /usr/local/apache-tomcat-6.0.18/temp
    Using JRE_HOME: /usr/java/jdk1.6.0_10
    Server version: Apache Tomcat/6.0.18
    Server built: Jul 22 2008 02:00:36
    Server number: 6.0.18.0
    OS Name: Linux
    OS Version: 2.6.9-55.ELsmp
    Architecture: i386
    JVM Version: 1.6.0_10-rc-b28
    JVM Vendor: Sun Microsystems Inc.

    • http://www.mkyong.com mkyong

      Thanks for your tip ~