Idea-SpringBoot:There was an unexpected error (type=Not Found, status=404). /WEB-INF/page//XX.jsp
程序员文章站
2024-03-25 17:07:34
...
Idea在启动SpringBoot时访问Jsp页面报错:There was an unexpected error (type=Not Found, status=404). /WEB-INF/page//XX.jsp
如图:
刚刚一开始看, 发现报错,有两个双斜杠//, 一开始第一反应就是mvc的配置是不是前缀有问题, 然后一看配置:
mvc:
view:
prefix: /WEB-INF/
suffix: .jsp
是没有问题的, 貌似不是地址的问题,然后又发现同事使用eclipse没有问题,就着重从Idea和Eclipse之间的区别开始找问题.
结果找了一圈终于找到了:
如果SpringBoot在子模块,直接main启动子模块会在C:\Users\xxx\AppData\Local\Temp这个目录下,会生成tomcat目录
但是在目录中,没有自动生成jsp的java和class文件.什么都没有
eclipse会自动生成jsp的java文件和class文件
解决办法就是IDea右边的Maven Projects
>>运行的模块>>plugins
>>spring-boog
>>spring-boot:run
启动
此时我们再看看tomcat文件夹
项目也能正常访问了!
下一篇: centos7安装mysql5.7
推荐阅读
-
Idea-SpringBoot:There was an unexpected error (type=Not Found, status=404). /WEB-INF/page//XX.jsp
-
spring boot jst 模板报404 There was an unexpected error (type=Not Found, status=404).
-
There was an unexpected error (type=Not Found, status=404)---采用layui出现的问题
-
idea:springboot整合jsp出现的错误:There was an unexpected error (type=Not Found, status=404). /WEB-INF/jsp。。
-
springboot中unexpected error (type=Not Found, status=404)/WEB-INF/upload.jsp和No message available解决方案
-
Whitelabel Error Page There was an unexpected error (type=Not Found, status=404). No message availab
-
浏览器请求spring-boot模块项目报:There was an unexpected error (type=Not Found, status=404).
-
springboot集成jsp,There was an unexpected error (type=Not Found, status=404). No message available
-
springboot+thymeleaf视图映射报错:There was an unexpected error (type=Not Found, status=404)
-
小白踩坑记:springboot运行一直报错:There was an unexpected error (type=Not Found, status=404).