問題
重裝了Myeslipse 2017後,配置Tomcat9.0後。部署了項目在服務器上,但是Tomcat啓動不了。
提示錯誤信息爲:
The server cannot be started because one or more of the ports are invalid. Open the server editor and correct the invalid ports.
解決
方法一:
我以爲是端口占用:殺死進程:
netstat -ano|findstr 8080
taskkill -f -pid 進程號
結果:進程取消後,仍然不能啓動。還報原來的錯。
方法二:
修改Tomcat9.0的sever.xml配置文件。
以前使用myeclipse10的時候沒有修改配置文件都可以用,所以我不來想去改的。但是沒有辦法了所以想去試試。
保存後重新啓動服務器。成功!