900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > Eclipse 新建WEB工程的WebContent目录设置默认WebRoot 和设置编译class默认输出WebRoot\WEB-INF\classes

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

时间:2023-09-22 15:40:48

相关推荐

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

目的:需求为了方便导入到myeclipse

有2种方式

方式一,需要每次建立工程时修改,参考/u012234915/article/details/53906945

方式二、通过配置文件,可以一劳永逸,如下

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文件下载地址

/download/love20yh/10540496

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。