如何在IDEA中配置这样的tomcat? [英] How to config tomcat like this in IDEA?

查看:423
本文介绍了如何在IDEA中配置这样的tomcat?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用eclipse + tomcat时,我可以将使用Tomcat安装设置为部署位置。我想问,是否可以在IDEA中进行配置。

When I use the eclipse + tomcat, I can set "Use Tomcat installation" as the deployment location. I want ask whether it's possbile to config it in IDEA.

推荐答案

如果您配置Tomcat应用程序服务器,如屏幕截图所示,IDEA将使用Tomcat来自D:\Programme\apache-tomcat-8.0.15\bin的二进制文件以及D:\catalina-base-idea\conf中的Tomcat配置。

If you configure your Tomcat application server like shown in the screenshot, IDEA will use the Tomcat binaries from "D:\Programme\apache-tomcat-8.0.15\bin" and the Tomcat configuration from "D:\catalina-base-idea\conf".

< img src =https://i.stack.imgur.com/1RhqU.pngalt =enter image description here>

当您运行yourWebApp时,IDEA将创建一个文件夹\system\tomcat中的目录结构。这是您的应用程序部署到的地方。

When you run "yourWebApp", IDEA will create a directory structure in the folder "\system\tomcat". This is the place where your application will be deployed to.

更新/另一种部署方式

如果您熟悉maven,可以使用tomcat7-maven-plugin

If you're familiar with maven, you can use the tomcat7-maven-plugin

<plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <!-- Tomcat 8 , too -->
    <version>2.2</version>
    <configuration>
        <server>tomcat8-local</server>
        <url>http://localhost:8080/manager/text</url>
        <path>/doormanP0</path>
    </configuration>
</plugin>

这篇关于如何在IDEA中配置这样的tomcat?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆