简体   繁体   English

如何在IntelliJ中将项目添加到Tomcat服务器

[英]How to add project to tomcat server in intellij

I've been able to configure my tomcat server in Intellij and have been able to run the server successfully. 我已经能够在Intellij中配置我的tomcat服务器,并且能够成功运行该服务器。 However, I can't seem to find where to actually add my project to the server in intellij. 但是,我似乎找不到在IntelliJ中将项目实际添加到服务器的位置。 I'm used to using eclipse where I would right-click my server and use the "Add and Remove" feature for the server. 我习惯于使用eclipse,在该服务器上右键单击服务器,然后对服务器使用“添加和删除”功能。 Is there something similar in intellij? intellij中有类似的东西吗?

首先,您可以找到服务器的配置页面,并添加新的tomcat服务器,然后根据需要在新服务器中设置webapp主页,最后,新服务器就是您需要的服务器。

  1. Create a web Facet at File - Project Structure File - Project Structure处创建Web File - Project StructureFile - Project Structure
  2. Create an Artifact from this Facet at the same page 在同一页面上从此构面创建工件
  3. Add a tomcat run configuration at Run - Edit configurationes , go to the Deployment tab, add you artifact to Deploy at the server startup Run - Edit configurationes添加tomcat运行配置,转到部署选项卡, Deploy at the server startup将工件添加到Deploy at the server startup

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM