问题:
在Eclipse中运行Web项目Jsp网页启动Tomcat时提示端口被占用:
Several ports (8005, 8080, 8009) required by Tomcat v9.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).
解决办法:
在Windows操作系统中运行输入cmd
(1)输入命令netstat -ano|findstr "8080",查看8080端口是否被占用,且得到了进程号“3084”;如果输入上述命令后再DOS窗口未出现任何信息提示,则表明所查询的端口未被占用。
(2)再输入命令tasklist|findstr "3084",得到进程映像名javaw.exe;
(3)启动任务管理器,结束javaw.exe进程;
(4)最后再输入命令netstat -ano|findstr "8080",查看8080端口是否被还占用