1.在eclipse的workspace里面找到该项目.settings文件夹

2.编辑org.eclipse.wst.common.project.facet.core.xml文件

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="jst.web" version="3.1"/>
<installed facet="jst.jaxrs" version="2.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
</faceted-project>

将<installed facet="jst.web" version="3.1"/> 改为低一点的版本,如<installed facet="jst.web" version="3.0"/>

改完后:

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="jst.jaxrs" version="2.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
</faceted-project>

记得,重启Eclipse。

05-06 13:50