Could not resolve XML resource [null] with public ID [-//Sun Microsystems, Inc.//DTD Web Application
创建项目时自动生成的web.xml配置文件头,是2.3的,改成2.5以及以上版本需要更换格式成:
<?xml version="1.0" encoding="UTF-8"?>
<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_1.xsd" version="3.1">
报错:web-app必须在一个实体内;多余的<web-app>标签