关于在eclipse中导入myeclipse下的web project不能出现run on server

来源:互联网 发布:淘宝描述不符被下架 编辑:程序博客网 时间:2024/06/05 10:48

       今天在学习时,试着把myeclipse中的web progect导入到eclipse中,发现运行不了,连那个run on server都出现不了,只会出现那个run Configurations,试了很多遍都不行,最后在网上找到了解决办法。

      步骤是这样的:

      1.可以用记事本打开的那个引入项目的.project,然后在里面添加一个配置如下:

       <buildCommand>   

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

       <arguments>    

       </arguments> 

       </buildCommand>      

     把下面的<natures></natures>里 的内容替换


  
        <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>
        <nature>org.eclipse.jdt.core.javanature</nature>
        <nature>org.eclipse.wst.jsdt.core.jsNature</nature>


 

 

      2.点击项目刷新,点右键,选properties——>project facets,然后我是这样选的

     

      3.找到本项目的.settings目录,将其中名为org.eclipse.wst.common.component的文件用记事本打开,然后可以看到其中一行是这样的  <wb-resource deploy-path="/" source-path="/WebContent"/>,把这行修改为

<wb-resource deploy-path="/" source-path="/WebRoot"/>

 

      4.刷新,运行就能看见那个run on server 啦。