Check / Determine Your Version of Tomcat and Java

Determine Your Version of Tomcat using console

Linux:

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

Windows:

java.exe -cp lib\catalina.jar org.apache.catalina.util.ServerInfo

 

The output should be similar to this:

java -cp catalina.jar org.apache.catalina.util.ServerInfo
Server version: Apache Tomcat/7.0.42
Server built: Jul 18 2014 10:08:19
Server number: 7.0.42.0
OS Name: Linux
OS Version: 2.6.32-531.29.2.lve1.3.11.1.el6.x86_64
Architecture: amd64
JVM Version: 1.7.0_75-mockbuild_2015_01_22_07_15-b00
JVM Vendor: Oracle Corporation

 

Location of catalina.jar in cPanel server is:

/usr/local/easy/share/java/easy-tomcat7

 

Determine Your Version of Tomcat using a JSP File

 

You can also check your version using a JSP file if you don’t have console access.

if you can upload a JSP file you may print out some info like in this example:bestdesigns.co.in/blog/check-jsp-tomcat-version

Save this code into a file called tomcat_version.jsp:

    Tomcat Version : <%= application.getServerInfo() %><br>    
    Servlet Specification Version : 
<%= application.getMajorVersion() %>.<%= application.getMinorVersion() %> <br>    
    JSP version :
<%=JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br>

When you access, http://example.com/tomcat_version.jsp, the output should look similar to:

Tomcat Version : Apache Tomcat/5.5.25
Servlet Specification Version : 2.4
JSP version: 2.0

 

You can also find out the server information through its status page:

{running-tomcat-url}/manager/status

On that page you can see the version of Java on which your Tomcat runs

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.