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-. ?