eclipse中导入外部web工程(非eclipse创建)时,不能运行的解决办法

eclipse中导入外部web工程时,在服务器中有时候看不到项目,解决办法
------------------------------------------------------------------
打开导入工程的.project文件,
在<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> 


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

--------------------------------------------------------------------

最后刷新项目,选择项目->点击project->properties->Project Facets->选中Java和Dynamic Web Module即可

猜你喜欢

转载自java-lxm.iteye.com/blog/1166346