网上搜到一些资料,按照其步骤操作,并不能成功。现将自己实际操作成功的步骤和问题记录下来。

1.打开navigator视图,编辑项目所在目录下的.project文件,添加

<nature>org.eclipse.wst.common.project.facet.core.nature</nature>

<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>

<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>

<buildSpec> </buildSpec>中加入

   <buildCommand>

      <name>org.eclipse.wst.common.project.facet.core.builder</name>

      <arguments>

      </arguments>

</buildCommand>

2.刷新项目,项目->右击->Properties->Project Facets->Modify Project,选择JavaDynamicWeb Modulejavascript

Myeclipse项目转移到eclipse问题_myeclipse

Java版本选1.6 Dynamic Web Module3.0,如果报错就选2.5

3.如果有报错

1)import javax.servlet.http.HttpServletRequest等类似的错误

就用tomcat安装包下面lib里面的servlet-api.jar包,放到项目下的lib里面即可。

2)如果jsp页面不识别uri http://java.sun.com/jsp/jstl/core则是缺少jarjstl.jar+standard.jar

3)如果jsp页面报错javax.servlet.jsp.jspexceptioncannot be resolve

导入tomcat里面lib下的jsp-api.jar

4.如果还有错误java compiler level does not match the version of the installed javaproject facet

Myeclipse项目转移到eclipse问题_eclipse_02

navigator视图下找到.settings文件,org.eclipse.wst.common.project.facet.core.xml配置文件

Myeclipse项目转移到eclipse问题_myeclipse_03

将版本改为1.6即可。

也可以在项目右键 propertiesjava compiler 将版本改为1.6. 出现不能识别@override时,也是修改此处java的版本。

Myeclipse项目转移到eclipse问题_myeclipse_04


Tomcat下的项目在此路径下

C:\Users\用户名\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps