不同servlet版本的web.xml的头部信息

servlet2.5

<?xml version="1.0" encoding="UTF-8"?>

<web-app 

    version="2.5"

    xmlns="http://java.sun.com/xml/ns/javaee" 

    xmlns:xml="http://www.w3.org/XML/1998/namespace"

    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">





</web-app>

servlet3.0

<?xml version="1.0" encoding="UTF-8"?>  

<web-app

        version="3.0"  

        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">  

   

</web-app>

 

<?xml version="1.0" encoding="UTF-8"?>

<web-fragment 

    version="3.0"

    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-fragment_3_0.xsd" >  

   

</web-fragment>

 

你可能感兴趣的:(servlet)