修改的文件
1.or,g.eclipse.wst.common.project.facet.core.xml
<installed facet="java" version="1.8"/>
<installed facet="jst.web" version="3.1"/>
2.修改web.xml(注意这个代码是不同版本内容不同的,不要只单纯修改版本号)
<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" metadata-complete="true">
</web-app>
3.0的用下面的
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0"
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">
3,再选择项目,右键maven-updateproject,project--》clean