Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
400 views
in Technique[技术] by (71.8m points)

java - Intellij tomcat local run configuration - what happens behind the scenes?

I've been using tomcat run configuration without any problems - it does a excellent job. However I kind of don't like the fact that it is not documented anywhere (or is it?) how this magic actually happens.

I suppose it somehow makes tomcat reference app created from artifact within target directory (if using maven). I also noticed that when using manager-gui app there are no other applications deployed so it must not use tomcat/webapps dir.

What I am curious is:

  1. How does it start tomcat to point at the application outside tomcat home?
  2. Does it deploy my app using {project_dir}/target/{appName}?
  3. Where is the manager-gui app?
  4. Where are the logs and conf files?
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I'm using IntelliJ IDEA 15.0.3, Tomcat 8.0.15 and JDK 1.8.0_31

This is an excerpt from C:Program Files (x86)JetBrainsIntelliJ IDEA 15.0.2inidea.properties:

#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
# idea.system.path=${user.home}/.IntelliJIdea/system
idea.system.path=D:/dev/IntelliJ-Settings/system

In File --> Settings... --> Build, Execution, Deployment --> Application Servers I've defined this: (look at Tomcat base directory)

enter image description here

D:catalina-base-idea contains the global Tomcat configuration for IntelliJ.

When I deploy my webapp using IntelliJ run configuration, the web app will be deployed to D:devIntelliJ-Settingssystemomcat (see idea.properties).

The above explains question 1.

Question 2: afaik, target is only used for building, not for deploying.

Question 3: there is no manager app within D:devIntelliJ-Settingssystemomcatwebapps

Question 4: logs are within D:devIntelliJ-SettingssystemomcatwebappsyourApp . The global Tomcat config is located in D:catalina-base-idea.

You can configure the Tomcat for IntelliJ so that it uses a port other than 8080. So you can start your standard Tomcat and IntelliJ Tomact at the same time.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...