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

Posted Littlego

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web modules相关的知识,希望对你有一定的参考价值。

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。

以上是关于解决Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web modules的主要内容,如果未能解决你的问题,请参考以下文章

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

报错修改:Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web

Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules

加载web项目时报的错误:Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4

Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules ???报错!!!

已解决(class file version 53.0), this version of the Java Runtime only recognizes class file