学习写代码呀

导航

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

posted on 2019-12-09 10:57  学习写代码呀  阅读(689)  评论(0编辑  收藏  举报