解决端口8080占用问题Starting Tomcat v7.0 Server at localhost has encountered a problem

在Eclipse开发项目的过程中,往往会出现8080端口或者8005或者8009的端口被占用。
‘Starting Tomcat v7.0 Server at localhost’ has
encountered a problem.
Several ports (8005, 8080, 8009) required by
Tomcat v7.0 Server at localhost are already in use.
The server may already be running in another
process, or a system process may be using the
port. To start this server
. you will need to stop the
other process or change the port number(s).
解决办法为:

1、在dos下,输入 netstat -ano|findstr 8080

//说明:查看占用8080端口的进程,显示占用端口的进程

2、taskkill /pid 8940 /f

//说明,运行windows自带taskkill命令,将上面显示的进程号,结束掉。
输入dos进入
命令控制台
解决端口8080占用问题Starting Tomcat v7.0 Server at localhost has encountered a problem
这样就可以成功终止被占用的端口问题了。