eclipse Eclipse中的部署目录在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3515089/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is the deployment directory in Eclipse?
提问by Dark Star1
I'm developing a web app in Eclipse. where is the deployment directory tree situated? In the Apache directory structure or some sub-directory tree structure in my Java workspace tree? I ask because I went browsing the directory tree(s) when an update to my tutorial app didn't work and, assuming that the srcsubtree represents my development directory tree I was hoping that the WebContent/WEB-INFsubtree would contain my deployment tree (I also assumed that when I run the app the deployment directory structure would be automatically created for me), but I found the WEB-INF empty.
我正在 Eclipse 中开发一个 Web 应用程序。部署目录树在哪里?在我的 Java 工作区树中的 Apache 目录结构或某些子目录树结构中?我问是因为当我的教程应用程序的更新不起作用时我浏览了目录树,并且假设src子树代表我的开发目录树,我希望WebContent/WEB-INF子树将包含我的部署树(我还假设当我运行应用程序时,会自动为我创建部署目录结构),但我发现 WEB-INF 为空。
回答by Pascal Thivent
I'm developing a web app in Eclipse. where is the deployment directory tree situated? In the Apache directory structure or some sub-directory tree structure in my Java workspace tree?
我正在 Eclipse 中开发一个 Web 应用程序。部署目录树在哪里?在我的 Java 工作区树中的 Apache 目录结构或某些子目录树结构中?
It all depends on how your Tomcat Server is configured. The default should be: .metadata/.plugins/org.eclipse.wst.server.core/tmp0
. But you can change this in the Tomcat server configuration. To do so, go to the Serversview, double-clickon your Tomcat server and modify the Server pathand Deploy path:
这完全取决于您的 Tomcat 服务器的配置方式。默认应该是:.metadata/.plugins/org.eclipse.wst.server.core/tmp0
。但是您可以在 Tomcat 服务器配置中更改此设置。为此,请转到Servers视图,双击您的 Tomcat 服务器并修改Server 路径和Deploy 路径:
I personally use the Tomcat installation for full control (and the default deploy path i.e. wtpwebapps
).
我个人使用 Tomcat 安装进行完全控制(以及默认部署路径 ie wtpwebapps
)。
If it is not possible to change something in the "Server Locations" section, then see this answeron how to change that.
如果无法更改“服务器位置”部分中的某些内容,请参阅有关如何更改的答案。
回答by meriton
Usually, Eclipse compiles into directories in the workspace. Once the build is complete, this directory is then copied by a deployment plugin into the directory Tomcat uses.
通常,Eclipse 会编译到工作区中的目录中。一旦构建完成,这个目录就会被部署插件复制到 Tomcat 使用的目录中。
If you use the WTP plugin bundled in the Eclipse Java EE download, the deployment location is configurable in the server's property page within eclipse.
如果您使用 Eclipse Java EE 下载中捆绑的 WTP 插件,则部署位置可在 eclipse 的服务器属性页中进行配置。