解决eclipse tomcat 端口报错

本文解决在eclipse 项目TomcatTest中使用Tomcat运行Jsp文件时,出现“the server cannot be started because one or more of the ports are invalid. open the server editor and correct the invalid ports.”报错的问题。

报错译文:服务器无法启动,因为一个或多个端口无效。打开服务器编辑器并纠正无效端口。

出现这个问题原因是我们刚刚安装好Tomcat时并没有在浏览器中配置Tomcat的端口。

双击对应的Servers项目:

将Tomcat admin 端口号修改为8005,Http 端口改为8089(端口号可自行设置,但是要避免和其他服务器冲突),修改后保存,重启 或启动Tomcat 服务器:

浏览器中访问 http://localhost:8089/TomcatTest/test.jsp 是否正常: