Servlet知识集锦
基础知识
Servlet规范和JSP版本
Servlet | JSTL | JSP | JSF | JavaEE | 备注 |
2.3 | 1.0 | 1.1/1.2 | J2EE1.3 | ||
2.4 | 1.1 | 2.0 | 1.1 | J2EE1.4 | Weblogic9.2只实现了2.4,必须使用JSTL 1.1和对应的Standard.jar、el-api.jar来支持JSTL和EL |
2.5 | 1.2 | 2.1 | 1.2/2.0 | JavaEE5 | |
3.0 | 2.2 | JavaEE6 |
Tomcat对Servlet规范的实现
Tomcat版本 | Servlet/JSP版本 | 最低JDK版本 |
3.3.2 | 2.2/1.1 | 1.1 |
4.1.40 | 2.3/1.2 | 1.3 |
5.5.33 | 2.4/2.0 | 1.4 |
6.0.32 | 2.5/2.1 | 1.5 |
7.0.12 | 3.0/2.2 | 1.6 |
web.xml声明
Servlet 2.3
1 2 |
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> |
Servlet 2.4
1 2 |
<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> |
Servlet 2.5
1 2 3 |
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="licsupvWebApp" version="2.5"> |
Leave a Reply