問題:
在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端口是否被還占用