All those who study web design will use tomcat. During installation, we usually select port 8080, which is usually not occupied by programs, so we won't have any problems when running tomcat, but if we don't use it, our tomcat won't be able to start. This experience will share with you how to solve this problem.
Tools/Raw Materials
Detect the port in use
Here we will take win7 as an example to explain.
Open cmd first. The method is very simple. Just enter it in the Start Menu. You can also press win + R to start running, and then enter cmd.
Enter the following command in the doscommand to query the port number being used and the program using it.
Command: netstat-ano
Content Analysis:
The process occupied by the previous program, followed by the colon is the port we are looking. Find 8080, because my solution has been solved, so the picture here cannot be for everyone.
We can see that there is a PID next to it, and then write down the PID that occupies port 8080.
Right-click the character bar and choose task manager.
Click Select in the menu bar-display the previous button. Then, the tab is displayed in the process column. You can see the PID used by the program.
Find the process that occupies port 8080 that you just queried and it will be OK after it is finished.
What should I do if the Tomcat port is occupied?