1.错误:

在eclipse中使用run->run on server的时候,选择tomcat6会报错误:The server does not support version 3.0 of the J2EE Web module specification

2.原因:

Tomcat 6.0最多支持Servlet 2.5,而现在要import的项目是3.0版本的。

3.解决方法:

在项目根目录下有一个.settings的文件夹,该文件夹下有一个org.eclipse.wst.common.project.facet.core.xml文件,内容如下:

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

<installed facet="jst.web" version="3.0"/>

改为

<installed facet="jst.web" version="2.5"/>

即可

 

相关文章:

  • 2021-06-10
  • 2022-12-23
  • 2021-07-22
  • 2022-01-16
  • 2021-05-10
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
猜你喜欢
  • 2022-02-13
  • 2022-01-05
  • 2022-01-31
  • 2021-11-10
  • 2021-09-27
  • 2022-01-15
  • 2021-06-01
相关资源
相似解决方案