Eclipse EE 运行 Myeclipse Web 应用

时间:2023-03-09 00:07:37
Eclipse EE 运行 Myeclipse 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>

第二步 :项目目录下的.classpath文件,把所有Webroot字符串替换为WebContent,保存。并把把目录下webroot的文件夹改名为WebContent。

第三步:根据错误提示添加需要的web服务器需要的包,一般需要添加servlet.jar包;

第四步:配置configure
Build Path------>当前窗面下选择选择Add Library----->server
Runtime------>选择需要的web服务器

第五步:在项目上点右键,进入属性(properties) ,在列表中选择“Project Facets”,在右侧选择“Dynamic Web Module”和"Java",点击保存

最后,刷新项目树,大功告成。run on server!