How to run two tomcats at the same time on one machine

1. Run the war package on a tomcat
Two projects, one of which is packaged as a war package and run on a decompressed tomcat server, how to package the war package and deploy to tomcat for details
2. Start tomcat in myEclipse

1. I debugged another project on tomcat, but the port number 8080 used by tomcat running in the war package is already occupied by it. If I start tomcat directly in myEclipse, it will report that the port number is occupied, eg:
write picture description here

2. Modify the port number
Find the server.xml file in the directory \apache-tomcat\conf\server.xml
. The port numbers
write picture description here
write picture description here
write picture description here
in all modified. I have changed them to 8081, 8004, 8008
and then started tomcat. just fine

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325535466&siteId=291194637