内容简介:我正在使用Tomcat 6.33,我想知道如何检查它是否支持Servlet 3.0或El 2.2?http://stackoverflow.com/questions/14359230/how-do-i-know-if-my-tomcat-supports-servlet-3-0-or-not
我正在使用Tomcat 6.33,我想知道如何检查它是否支持Servlet 3.0或El 2.2?
您可以通过阅读Tomcat文档进行检查 – 请参阅 http://tomcat.apache.org/whichversion.html
…其中列出了每个主要版本的Tomcat支持的JSP和Servlet规范的版本. (答案 – Tomcat 6.x的Servlet 2.5和JSP / EL 2.1)
如果要在运行时查找Servlet规范版本,那么
ServletContext
API有一个叫做getMajorVersion()和getMinorVersion()的方法.
我也 found 这个配方显示各种版本号使用JSP:
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>
http://stackoverflow.com/questions/14359230/how-do-i-know-if-my-tomcat-supports-servlet-3-0-or-not
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
The Sovereign Individual
James Dale Davidson、William Rees-Mogg / Free Press / 1999-08-26 / USD 16.00
Two renowned investment advisors and authors of the bestseller The Great Reckoning bring to light both currents of disaster and the potential for prosperity and renewal in the face of radical changes ......一起来看看 《The Sovereign Individual》 这本书的介绍吧!