eclipse中java工程转为web工程

1、修改项目的.project文件,保存,不记得是否需要重启Eclipse了。
在<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>

2. 在Eclipse中打开“project properties",会看到新增了很多选择项,点中"Project Facets",选中:Dynamic Web Module和java即可。

3.web部署目录的设置

在org.eclipse.wst.common.component中加入:

<wb-resource deploy-path="/" source-path="/src/main/webapp"/>
则个性化了web的部署目录

猜你喜欢

转载自bill-xing.iteye.com/blog/969240
今日推荐