eclipse导入myeclipse的web项目没法识别问题解决方法



1、进入项目目录,找到.project文件,打开。

2、找到<natures>...</natures>代码段。

3、在第2步的代码段中加入如下标签内容并保存:

<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>

    <buildCommand>

        <name>org.eclipse.wst.validation.validationbuilder</name>

        <arguments>

        </arguments>

    </buildCommand>

4、项目目录下的.classpath文件,把所有Webroot字符串改为WebContent,保存。

5、把目录下webroot的文件夹改名为WebContent。

6、在eclipse中Java Resources:src目录的Libraries里添加web服务器需要的包,选择BiuldPath----->configure Build Path------>当前窗面下选择选择Add Library----->server Runtime------>选择需要的web服务器


7、在eclipse的项目上点右键,刷新项目。

8、在项目上点右键,进入属性(properties)

 

9、在左侧列表项目中点击选择“Project Facets”,在右侧选择“Dynamic Web Module”和"Java",点击保存即可。

 

这时应该可以在eclipse下正常启动项目了

posted @ 2015-01-06 12:29  金虹巴巴  阅读(282)  评论(0编辑  收藏  举报