这是由于web-app标签里面的子标签顺序不对,只需按照提示的顺序修改标签顺序就可以了,或者修改web.xml的schema如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
version="2.5"
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">
// your all conent goes here
</web-app>