解决步骤:
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="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="2.5"/>
</faceted-project>
3.重启eclipse
原文链接:https://blog.csdn.net/longtingjing/article/details/53557947