Eclipse:
When you configure Tomcat, Eclipse is essentially mapping a tomcat image in the. Metadata Serer.core directory, creating a Tomcat mapping file named "TMP number" for each tomcat, There is no relationship between the image created and the source Tomcat, and Eclipse is running the project through this mirrored tomcat.
Idea:
The tomcat configured in idea, at run time, idea does not put the project under that path, but rather copies a sufficient configuration file to ${user.home}/. The Intellijidea/system/tomcat directory means that each project has its own tomcat configuration that does not interfere with each other. There is a/conf/catalina/localhost/root.xml file in the configuration folder for each project, which reads as follows:
<?xml version= "1.0" encoding= "UTF-8"? ><context path= "docbase=" D:\work\ project \target\xxx-web "/>
which
Path refers to whether you need to add additional paths when accessing this project, and if it is empty, you can access the project directly using the domain name or IP
Docbase refers to the deployment location of the project to be run, the D:\work\ project is the location of my project source code, and target is built by MAVEN, D:\work\ Project \target\xxx-web
The entire project runs as follows: Build the project first, write the build results to the project target directory, and then idea to copy a tomcat configuration file to ${user.home}/. Intellijidea/system/tomcat, after starting the Catalina.bat file in the Tomcat installation directory, Tomcat reads the configuration file, finds the project location, and then runs.
The difference between eclipse and idea configuration tomcat