Recently nothing to do, write their own small project (the project cycle is infinite, the development efficiency is unlimited), encountered the DTD declaration of Web. XML is not correct, here is the new project from Eclipse, the auto-generated Web. XML, for later encounter similar problems for reference. Of course, Web. XML, servlet version, JSP version, HTTP version has a lot of links between, I do not understand, not much to say.
Web. XMLWeb. XML 3.0
<?XML version= "1.0" encoding= "UTF-8"?><Web-appXmlns: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_3_0.xsd"ID= "webapp_id"version= "3.0"> <Display-name>webapp_id_3.0</Display-name> <welcome-file-list> <Welcome-file>index.jsp</Welcome-file> </welcome-file-list></Web-app>
Web. XML 2.5
<?XML version= "1.0" encoding= "UTF-8"?><Web-appXmlns: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= "webapp_id"version= "2.5"> <Display-name>webapp_id_2.5</Display-name> <welcome-file-list> <Welcome-file>index.jsp</Welcome-file> </welcome-file-list></Web-app>
Web. XML 2.4
<?XML version= "1.0" encoding= "UTF-8"?><Web-appID= "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"> <Display-name>webapp_id_2.4</Display-name> <welcome-file-list> <Welcome-file>index.jsp</Welcome-file> </welcome-file-list></Web-app>
Web. XML 2.3
<?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 "><Web-appID= "webapp_id"> <Display-name>webapp_id_2.3</Display-name> <welcome-file-list> <Welcome-file>index.jsp</Welcome-file> </welcome-file-list></Web-app>
Web. XML 2.2
<?XML version= "1.0" encoding= "UTF-8"?><!DOCTYPE Web-app Public "-//sun Microsystems, INC.//DTD Web Application 2.2//en" "http://java.sun.com/j2ee/dtds/ Web-app_2_2.dtd "><Web-appID= "webapp_id"> <Display-name>webapp_id_2.2</Display-name> <welcome-file-list> <Welcome-file>index.jsp</Welcome-file> </welcome-file-list></Web-app>
Web. XML templates and servlet versions