It perfectly solves the problem that ports such as 8080 are occupied when deploying Tomcat on eclipse
Problem Description:
When deploying Tomcat in eclipse, the following error occurs.
The solution is as follows:
Method 1:
1. Start - 《 CMD - 》 enter the command netstat - ano as shown in the following figure (note that there is some dislocation in the lower display, and the last column is PID):
2. Some students enter netstat - ano and it is not an internal file. The solution is as follows:
Start - "CMD -" CD: C \ windows \ system32\
The results are shown in the figure above.
3. Open the Windows Task Manager, click view, click the selection column, and highlight the PID option, as shown in the following figure:
4. Since port 8080 on your computer is closed, we take port 80 as an example (the operation is the same):
Compare the process with PID 4 in DOS window, select it in Windows Task Manager and click end process. Solve the problem of port occupation!
Method 2:
Find the conf file in the Tomcat installation directory, and then find the server XML, open server XML, change the 8080 port to any or other, and the port can be used. (but repeat)
Attached:
As mentioned above, there are two common commands for ending the process (take the PID above as an example):
1. Taskkill / PID process ID (4) / F
2. Taskkill / im process name / F
Im = image name f = force indicates forced end;
The above article perfectly solves the problem that ports such as 8080 are occupied when deploying Tomcat on eclipse. It is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.