How to Check Tomcat Version

If you have linux based server. You can check Tomcat version following two methods.

Method 1:

sh /usr/share/tomcat7/bin/version.sh

The output would be similar:

Server version:ApacheTomcat/7.0.42Server built:   time here
Server number:7.0.42.0
OS Name:Linux
OS Version:2.6.32-042stab084.26 Architecture:   processor
JVM Version:1.7.0_21-b11
JVM Vendor:OracleCorporation


Method 2:
 
The other way is to test to get version information using code in a jsp file. Create a new file under public_html folder (for cPanel)

Type below code in tomcat_version.jsp file:

TomcatVersion:<%= application.getServerInfo()%><br>ServletSpecificationVersion:<%= application.getMajorVersion()%>.<%= application.getMinorVersion()%><br>    
    JSP version :<%=JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion()%><br>

browse to the URL to tomcat_version.jsp i.e. http://example.com/tomcat_version.jsp,
You will see the output similar to:

Tomcat Version : Apache Tomcat/7.0.42
Servlet Specification Version : 3.0 
JSP version : 2.2
Was this answer helpful? 50 Users Found This Useful (54 Votes)