Can you tell me how to know which servlet and JSP version am I using ? I use NetBeans IDE 7.1.2 for creating Servlets and JSP.
你能告诉我如何知道我使用的是哪个servlet和JSP版本吗?我使用NetBeans IDE 7.1.2来创建Servlet和JSP。
3 个解决方案
#1
18
You can get the details programatically using ServletContext #getMajorVersion() and #getMinorVersion().
您可以使用ServletContext #getMajorVersion()和#getMinorVersion()以编程方式获取详细信息。
For knowing the JSP version corresponding to the Servlet, you can get details from this Tomcat page
要了解与Servlet对应的JSP版本,可以从此Tomcat页面获取详细信息
Below is the summary,
以下是摘要,
Servlet 2.5 uses JSP 2.1
Servlet 2.4 uses JSP 2.0
Servlet 2.3 uses JSP 1.2
Servlet 2.2 uses JSP 1.1
Servlet 2.1 uses JSP 1.0
#2
26
You can easily check the JSP,SERVER and SERVLET version. Add the following code in your jsp page after that run using any IDE Tools.
您可以轻松检查JSP,SERVER和SERVLET版本。使用任何IDE工具运行后,在jsp页面中添加以下代码。
Server Version: <%= application.getServerInfo() %><br>
Servlet Version: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %>
JSP Version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %> <br>
#3
15
The version is declared in the web.xml file - compare http://wiki.metawerx.net/wiki/Web.xml
该版本在web.xml文件中声明 - 比较http://wiki.metawerx.net/wiki/Web.xml
#1
18
You can get the details programatically using ServletContext #getMajorVersion() and #getMinorVersion().
您可以使用ServletContext #getMajorVersion()和#getMinorVersion()以编程方式获取详细信息。
For knowing the JSP version corresponding to the Servlet, you can get details from this Tomcat page
要了解与Servlet对应的JSP版本,可以从此Tomcat页面获取详细信息
Below is the summary,
以下是摘要,
Servlet 2.5 uses JSP 2.1
Servlet 2.4 uses JSP 2.0
Servlet 2.3 uses JSP 1.2
Servlet 2.2 uses JSP 1.1
Servlet 2.1 uses JSP 1.0
#2
26
You can easily check the JSP,SERVER and SERVLET version. Add the following code in your jsp page after that run using any IDE Tools.
您可以轻松检查JSP,SERVER和SERVLET版本。使用任何IDE工具运行后,在jsp页面中添加以下代码。
Server Version: <%= application.getServerInfo() %><br>
Servlet Version: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %>
JSP Version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %> <br>
#3
15
The version is declared in the web.xml file - compare http://wiki.metawerx.net/wiki/Web.xml
该版本在web.xml文件中声明 - 比较http://wiki.metawerx.net/wiki/Web.xml