无法登录http://localhost:8080,但tomcat可用

配置eclipse时,自己上官网下载的tomcat9。
安装完成后,http://localhost:8080/登录成功,可以看到tomcat的页面。

但后来,在输入http://localhost:8080/,并不跳转出tomcat页面
不过项目能正常运行。

图片描述

阅读 3.9k
1 个回答

检查一下你的web.xml文件中有没有设置<welcome-file-list>,就像这样:

<welcome-file-list>
   <welcome-file>index</welcome-file>
</welcome-file-list>

或者你也可以这样:

<welcome-file-list>
   <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

看下你有没有对应的index地址,或者是index.jsp这个文件,如果你是设置的index.jsp,那么必须要有这个index.jsp这个文件才行。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进