1. 根据自身情况修改web.xml中的<webapp>中的内容:
我的修改为:
<?xml version="1.0" encoding="UTF-8"?>
<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">
2.关闭eclipse
修改项目文件加中的.seting\org.eclipse.wst.common.project.facet.core文件
我的修改为:
<installed facet="jst.web" version="3.1"/>
打开eclipse,刷新项目。。。。。。。