在工程目录下的.settings文件夹里,打开org.eclipse.wst.common.project.facet.core.xml文件,其内容是:
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v7.0"/>
<fixed facet="java"/>
<fixed facet="jst.web"/>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
第一种做法:
删除中间几行,只留下下面三行就行
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
</faceted-project>
第二种做法:
将<runtime name="Apache Tomcat v7.0"/>改成你tomcat的版本比如<runtime name="Apache Tomcat v8.0"/>