Current location - Quotes Website - Team slogan - What if Tomcat's port number is occupied?
What if Tomcat's port number is occupied?
Start the task manager

Right-click on the horizontal panel below the computer and a box will pop up. Find "Start Task Manager" in the box.

End process

Click "Start Task Manager" and we can see all the programs running on our computer in "Process". Find the program with port number 8080 here, and click to end the process.

Restart Tomcat

Find startup.bat in Tomcat's installation directory and restart.

Found the configuration file

If Tomcat fails to restart, we will change the port number of Tomcat. Enter Tomcat's installation directory and find the conf folder to enter.

Find the server.xml file.

Locate the server.xml file, right-click it, and open it with Editplus. Of course, you can also open it with other editing tools.

Modify port

Find the connector label. There is a port attribute under this label. Change the 8080 of this attribute to 8899 or something else. Then save and restart Tomcat, and it will start successfully at one point.