The server does not support version 3.0 of the J2EE Web module specification

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"/>
即可

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章