Thursday, 3 October 2019

how to find out running tomcat version in linux or windows

We can find it in different ways

1) from version sh file you can find the version.sh file location in linux by 

   
sudo find / -name "version.sh"
then just execute it
./version.sh

Output would be
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


2) by catalina jar


First, find catalina.jar by using below command on linux

sudo find / -name "catalina.jar"

if you are using windows then you will find it in apache installation directory

run below command to get the version

java -cp catalina.jar org.apache.catalina.util.ServerInfo

it will give below output

Server version: Apache Tomcat/8.0.50
Server built:   Mar 20 2018 20:30:11 UTC
Server number:  8.0.50.0
OS Name:        Linux
OS Version:     4.14.47-56.37.amzn1.x86_64
Architecture:   amd64
JVM Version:    1.8.0_171-b10
JVM Vendor:     Oracle Corporation