web.xml的schema

版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/lengchu_org/article/details/81384627

JavaEE5和6(对应servlet2.5和servlet3.0)在旧的命名空间:
http://java.sun.com/xml/ns/javaee/
对应的web.xml:

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    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>

JavaEE7(对应servlet3.1)及以后的在新的命名空间:
http://xmlns.jcp.org/xml/ns/javaee/
对应的web.xml:

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    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>

参考: http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html

猜你喜欢

转载自blog.csdn.net/lengchu_org/article/details/81384627
今日推荐