tomcat正常启动但是为什么不能访问页面

头痛了半天,原来是tomcat设置错误造成的

1、首先,bai右键点击server栏中的tomcat,在弹du出的对话款中选择General

tomcat正常启动但是为什么不能访问页面

2、并且点击右边栏的Switch Location切换Location为:/Servers/tomcat vx.x Server at localhost.server。

tomcat正常启动但是为什么不能访问页面

3、然后双击tomcat服务,此时Server Location中的选项就不是灰色的了。勾选第二个选项“Use Tomcat installation”。

tomcat正常启动但是为什么不能访问页面

4、右键点击tomcat服务并点击Start启动tomcat,再登陆localhost:8080。

tomcat正常启动但是为什么不能访问页面

5、最后发现此时就可以正常的在eclipse中启动tomcat了。

tomcat正常启动但是为什么不能访问页面