今天在使用Tomcat的时候,启动之后发现项目可以访问到,但是访问 localhost:8080 却不行了,好家伙,然后一通百度,终于找到了办法,IDEA编译器也不知道为什么还有这种 ** 问题。

感谢这位老哥:https://blog.csdn.net/u012461090/article/details/101288736

  1. JDK版本:1.8
  2. Tomcat版本:8.5. xx
  3. IDEA版本:2020.3.2

解决方案如下:

把 tomcat 安装目录 webapp 下的ROOT文件夹配置到 IDEA 中即可,注意:修改application context为 / ,默认为/ROOT。

操作步骤如下:

IDEA启动tomcat访问localhost:8080出现404错误

IDEA启动tomcat访问localhost:8080出现404错误

IDEA启动tomcat访问localhost:8080出现404错误

之后就可以在IDEA中启动tomcat,发现可以访问到了。

相关文章:

  • 2021-06-07
  • 2021-07-09
  • 2022-12-23
  • 2021-04-19
  • 2021-10-21
  • 2021-11-19
  • 2021-10-10
  • 2021-12-25
猜你喜欢
  • 2021-08-24
  • 2022-02-26
  • 2021-04-15
  • 2021-07-19
  • 2021-05-29
  • 2021-05-20
相关资源
相似解决方案