您的位置:首页 > 编程语言 > Java开发

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

2013-08-03 22:00 351 查看
今天在学习时,试着把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 啦。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: