zoukankan      html  css  js  c++  java
  • web.xml 文件头

     Servlet 2.3

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

    Servlet 2.4,J2EE 1.4 XML schema, namespace is http://java.sun.com/xml/ns/j2ee

    <web-app 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"
              version="2.4">
        <display-name>Servlet 2.4 Web Application</display-name>
    </web-app>

    Servlet 2.5,Java EE 5 XML schema, namespace is http://java.sun.com/xml/ns/javaee

    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
              http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
              version="2.5">
    </web-app>

    Servlet 3.0,Java EE 6 XML schema, namespace is http://java.sun.com/xml/ns/javaee

    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
             http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
             version="3.0">
    </web-app>

    Servlet 3.1,Java EE 7 XML schema, namespace is http://xmlns.jcp.org/xml/ns/javaee

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
             http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
             version="3.1">
    </web-app>

    Servlet 4.1

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
         http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
         version="4.0">
        <display-name>Archetype Created Web Application</display-name>
    </web-app>

    https://www.mkyong.com/web-development/the-web-xml-deployment-descriptor-examples/

    https://en.wikipedia.org/wiki/Java_servlet

  • 相关阅读:
    微信mac版的bug 直接显示了消息原始数据
    提一下InfoQ
    成长
    SaaS产品成功学
    .io域名在申请SSL证书时被坑
    一件小事
    Git做代码增量发布的重要用法
    今天
    为什么都不写博
    惑不惑
  • 原文地址:https://www.cnblogs.com/jhxxb/p/10573843.html
Copyright © 2011-2022 走看看