【问题标题】:Unable to access the jsp page [closed]无法访问jsp页面[关闭]
【发布时间】:2018-01-15 21:34:03
【问题描述】:

我刚开始在 IntelliJ idea 上使用 spring boot 和 JSP,使用 gradle 作为构建工具。当我运行应用程序时,我看到 404 浏览器上的错误,并且在服务器控制台日志上我看到以下消息 - 在名称为“dispatcherServlet”的 DispatcherServlet 中找不到具有 URI [/WEB-INF/views/index.jsp] 的 HTTP 请求的映射

我尝试了很多,但无法找出上述问题的 RCA 是什么。有人可以通过查看代码存储库来帮助我吗:https://github.com/vmaramreddy1/spring-jsp-setup

【问题讨论】:

  • 需要你的项目结构和你的配置和控制器代码

标签: spring jsp spring-mvc spring-boot intellij-idea


【解决方案1】:

您需要将“web”目录中的资源移动到“src/main/webapp”目录。这就是 Spring 期望找到视图的地方。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-05-19
    • 2016-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-05
    • 2015-07-01
    相关资源
    最近更新 更多