Web App 3.1
1 <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"2 ?????????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"3 ?????????xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee4 ?????????http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"5 ?????????version="3.1">6 7 ??...8 </web-app> ??
Web App 3.0
1 <?xml version="1.0" encoding="UTF-8"?> ?2 <web-app ?xmlns="http://java.sun.com/xml/ns/javaee" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 5 ??????????http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 6 version="3.0">7 8 ??...9 </web-app>
Web App 2.5
1 <?xml version="1.0" encoding="UTF-8"?>2 <web-app xmlns="http://java.sun.com/xml/ns/javaee"3 ????????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"4 ????????xsi:schemaLocation="http://java.sun.com/xml/ns/javaee5 ????????http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"6 ????????version="2.5">7 8 ??...9 </web-app>
Web App 2.4
1 <?xml version="1.0" encoding="UTF-8"?> 2 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 ????????xmlns="http://java.sun.com/xml/ns/j2ee" 4 ????????xmlns:web="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 5 ????????xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 6 ????????http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 7 ????????version="2.4"> 8 ?9 ??...10 </web-app>
Web App 2.3
1 <?xml version="1.0" encoding="UTF-8"?>2 <!DOCTYPE web-app3 ????PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"4 ????"http://java.sun.com/dtd/web-app_2_3.dtd">5 <web-app>6 7 ??...8 </web-app>
不同版本(2.3/2.4/2.5/3.0/3.1)web.xml头信息
原文地址:http://www.cnblogs.com/yhen/p/verious-version-web-xml-header-declaration.html