我怎么知道我的Tomcat是否支持Servlet 3.0?

时间:2021-08-04 07:30:58

I am using Tomcat 6.33 and I am wondering how can I check if it supports Servlet 3.0 or El 2.2 or not?

我正在使用Tomcat 6.33,我想知道如何检查它是否支持Servlet 3.0或El 2.2?

3 个解决方案

#1


25  

You can check by reading the Tomcat documentation - see the Apache Tomcat Versions page ... which lists the versions of the JSP and Servlet specs supported by each major version of Tomcat.

您可以通过阅读Tomcat文档来查看 - 请参阅Apache Tomcat Versions页面...其中列出了每个主要版本的Tomcat支持的JSP和Servlet规范的版本。

(Answer from the list: Tomcat 6.x supports Servlet 2.5 and JSP/EL 2.1)

(从列表中回答:Tomcat 6.x支持Servlet 2.5和JSP / EL 2.1)


If you want to find out the Servlet spec version at runtime, the ServletContext API has methods called getMajorVersion() and getMinorVersion() that should tell you.

如果你想在运行时找到Servlet规范版本,ServletContext API有一些叫做getMajorVersion()和getMinorVersion()的方法应该告诉你。

I also found this recipe for displaying various version numbers using a JSP:

我还发现了这个使用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>

#2


5  

From http://tomcat.apache.org/whichversion.html: Tomcat 6 supports Servlet 2.5

来自http://tomcat.apache.org/whichversion.html:Tomcat 6支持Servlet 2.5

#3


2  

Servlet 3.0 API is supported on Apache Tomcat 7.0.x onwords, Apache Tomcat 7.0.65 being the actual release version.

Apache Tomcat 7.0.x onwords支持Servlet 3.0 API,Apache Tomcat 7.0.65是实际的发行版本。

#1


25  

You can check by reading the Tomcat documentation - see the Apache Tomcat Versions page ... which lists the versions of the JSP and Servlet specs supported by each major version of Tomcat.

您可以通过阅读Tomcat文档来查看 - 请参阅Apache Tomcat Versions页面...其中列出了每个主要版本的Tomcat支持的JSP和Servlet规范的版本。

(Answer from the list: Tomcat 6.x supports Servlet 2.5 and JSP/EL 2.1)

(从列表中回答:Tomcat 6.x支持Servlet 2.5和JSP / EL 2.1)


If you want to find out the Servlet spec version at runtime, the ServletContext API has methods called getMajorVersion() and getMinorVersion() that should tell you.

如果你想在运行时找到Servlet规范版本,ServletContext API有一些叫做getMajorVersion()和getMinorVersion()的方法应该告诉你。

I also found this recipe for displaying various version numbers using a JSP:

我还发现了这个使用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>

#2


5  

From http://tomcat.apache.org/whichversion.html: Tomcat 6 supports Servlet 2.5

来自http://tomcat.apache.org/whichversion.html:Tomcat 6支持Servlet 2.5

#3


2  

Servlet 3.0 API is supported on Apache Tomcat 7.0.x onwords, Apache Tomcat 7.0.65 being the actual release version.

Apache Tomcat 7.0.x onwords支持Servlet 3.0 API,Apache Tomcat 7.0.65是实际的发行版本。