Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web

时间:2022-02-18 14:00:47

eclipse下配置的tomcat无法添加项目;
1)配置更高版本的tomcat
2)降低项目J2EE版本
修改项目setting目录下org.eclipse.wst.common.project.facet.core.xml
举例:原始配置为

<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
  <fixed facet="jst.web"/>
  <fixed facet="jst.java"/>
  <installed facet="jst.java" version="1.8"/>
  <installed facet="jst.web" version="3.1"/>
</faceted-project>

修改为

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