eclipse Eclipse如何使用Tomcat部署Web Application

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9482763/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:46:51  来源:igfitidea点击:

How does Eclipse deploy Web Application using Tomcat

eclipsejakarta-eeweb-applicationstomcat

提问by whitehat

How does Eclipse work internally with Apache (or Tomcat). Beacause it doesn't deploy our Web Application inside "webapps" directory of Tomcat. So how does it do it??

Eclipse 如何在内部与 Apache(或 Tomcat)一起工作。因为它不会在 Tomcat 的“webapps”目录中部署我们的 Web 应用程序。那么它是如何做到的呢??

回答by Wojtek Owczarczyk

By default Eclipse deploys *.warfiles inside a internal webappsfolder called wtpwebappswhich is located in the following directory:

默认情况下,Eclipse 将*.war文件部署在名为wtpwebapps的内部webapps文件夹中,该文件夹位于以下目录中:

{Workspace_location}/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps

{Workspace_location}/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps

This behaviour however is customizable using Server Locationsoption defined in server options panel accesible by double clicking the desired server from Serversview in Eclipse:

但是,此行为可使用服务器选项面板中定义的服务器位置选项进行自定义,可通过在 Eclipse 的服务器视图中双击所需的服务器进行访问:

Tomcat configuration panel in Eclipse

Eclipse 中的 Tomcat 配置面板

回答by ankur kushwaha

enter image description here

在此处输入图片说明

You can also select the second option. Then eclipse will deploy your app under the default "wtpwebapps" folder under tomcat directory.

您也可以选择第二个选项。然后 eclipse 会将您的应用程序部署在 tomcat 目录下的默认“wtpwebapps”文件夹下。

Click herefor more details on how to enable this setting

单击此处了解有关如何启用此设置的更多详细信息