最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

Eclipse 新建WEB工程的WebContent目录设置默认WebRoot,和设置编译class默认输出WebRootWEB

互联网 admin 5浏览 0评论

Eclipse 新建WEB工程的WebContent目录设置默认WebRoot,和设置编译class默认输出WebRoot\WEB

目的:需求为了方便导入到myeclipse
有2种方式
方式一,需要每次建立工程时修改,参考
方式二、通过配置文件,可以一劳永逸,如下
1、创建一个txt文件,并改名为:“org.eclipse.wst.web.prefs”
2、打开text文件,复制以下代码:必须注意大小写

# content directory, change the default name "WebContent" to "webroot"webContent=WebRoot# make the default output of web project from %proj%\bin to %webroot%\WEB-INF\classesuseSingleRootStructure=true

3、将文件后缀名”.txt”去掉,使文件为“org.eclipse.wst.web.prefs”
4、将文件移动到你eclipse目录下的configuration\.settings下

%eclipse%\configuration\.settings

5:重启你的Eclipse

(以上设置没效果,第4部的备用方案)将文件移动到你所配置的工作区间:

%workspace%\.metadata\.plugins\org.eclipse.core.runtime\.settings.

org.eclipse.wst.web.prefs文件下载地址

Eclipse 新建WEB工程的WebContent目录设置默认WebRoot,和设置编译class默认输出WebRoot\WEB

目的:需求为了方便导入到myeclipse
有2种方式
方式一,需要每次建立工程时修改,参考
方式二、通过配置文件,可以一劳永逸,如下
1、创建一个txt文件,并改名为:“org.eclipse.wst.web.prefs”
2、打开text文件,复制以下代码:必须注意大小写

# content directory, change the default name "WebContent" to "webroot"webContent=WebRoot# make the default output of web project from %proj%\bin to %webroot%\WEB-INF\classesuseSingleRootStructure=true

3、将文件后缀名”.txt”去掉,使文件为“org.eclipse.wst.web.prefs”
4、将文件移动到你eclipse目录下的configuration\.settings下

%eclipse%\configuration\.settings

5:重启你的Eclipse

(以上设置没效果,第4部的备用方案)将文件移动到你所配置的工作区间:

%workspace%\.metadata\.plugins\org.eclipse.core.runtime\.settings.

org.eclipse.wst.web.prefs文件下载地址

发布评论

评论列表 (0)

  1. 暂无评论