Determining the Servlet and JSP Version of My Java Web Application

Does the link web-app _ *. dtd web.xml version of Servlet and JSP used in web application?

Somehow I was so impressed, but it seems like I'm wrong. I have an application in which web.xml indicates

<!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">

I thought he should use version Servlet 2.3. However, when I add the following code to my JSP, I get a completely different version.

<div>
Server info: <%= application.getServerInfo() %><br>  
Servlet version: <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %>  
JSP version: <%= JspFactory.getDefaultFactory().getEngineInfo().getSpecificationVersion() %><br> 
</div>

Conclusion:

Server info: Apache Tomcat/7.0.21
Servlet version: 3.0
JSP version: 2.1

I will take care of help on several related issues:

  • Does the dtd version support the version of Servlet and JSP used in the application?
  • Is my application using version Servlet 3.0 because it is the default version used by Apache Tomcat 7?
  • Is there a way to make Tomcat 7 use an older version of JSP for servlet?
  • (Bauke Scholtz) , , , Servlet JSP-. ?
+3
2

dtd - Servlet JSP, ?

, , , .

Servlet 3.0, , Apache Tomcat 7?

, 3.0, , 3.0. 2.5, 3.0 .

Tomcat 7, JSP ?

. , web.xml

(Bauke Scholtz) , , , Servlet JSP. ?

. . JavaEE, JavaEE . Ex JavaEE 5 Servlet 2.5 JSP 2.1, JavaEE 6 Servlet 3.0 JSP2.2.

+1

dtd - Servlet JSP ?

.

Servlet 3.0, , Apache Tomcat 7?

.

Tomcat 7, JSP ?

, Tomcat.

(Bauke Scholtz) , , JSP. true?

.

0

All Articles