JavaRanch Home    
 
This page:         last edited 11 January 2009         What's Changed?         Edit

Which Version Am I Running On   

Here's a snippet of JSP code that displays the Servlet API version, the JSP version, the JRE version and also the name and version of the servlet container (taken from a Saloon post by Bauke Scholtz).
Server info: <%= application.getServerInfo() %><br>  
Servlet version: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %><br>  
JSP version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br>  
Java version: <%= System.getProperty("java.version") %><br>  


JspFaq ServletsFaq

JavaRanchContact us — Copyright © 1998-2014 Paul Wheaton