References

web.xml deployment descriptor

4.0 -> for Java EE 8
3.1 -> for Java EE 7
3.0 -> for Java EE 6
2.5 -> for Java EE 5
2.4 -> for Java EE 4

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

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

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>