How to check JSP and Tomcat version?

 

You can easily check the JSP version. You need to create test.jsp page under your account and add the following code into that file and access the test.jsp page by using browser " http://domainname/test.jsp " then it shows the tomcat version, JSP version and servlet version.

<html><head><title>Test JSP page</title></head><body bgcolor=white>

<table border="0"><tr><td><h1>Sample Application JSP Page</h1>
This is the output of a JSP page that is part of the Hello, World application.
It displays several useful values from the requestwe are currently processing.</td></tr>
</table>

<table border="0" border="100%"><tr>
<th align="right">Request Method:</th>
<td align="left"><%= request.getMethod() %></td></tr><tr>
<th align="right">Servlet Path:</th>
<td align="left"><%= request.getServletPath() %></td></tr>

<tr>
<th align="right">Working with server:</th>
<td align="left"><%= application.getServerInfo() %></td></tr>
<tr>
<th align="right">Servlet Specification:</th>
<td align="left"><%= application.getMajorVersion() %>.<%= application.getMinorVersion() %></td></tr>
<tr>
<th align="right">JSP version:</th>
<td align="left"><%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %></td></tr>
</table></body></html>



Was this answer helpful?

Add to Favourites
Print this Article

Also Read
How do I run servlet after servlet installation? (Views: 797)
what is the JVM Heap size? (Views: 812)
What is JSP? (Views: 766)
How to connect to MySql using JSp? (Views: 807)
Where is WEB-INF folder? Where to upload .class and .jar files? (Views: 1086)