@[2900498871@qq.com]
直接切入正题,首先是否可以访问controller 方法(如图)

启动类代码片.

// An highlighted block
package com.example.demo;import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;import java.util.Map;@Controller
@SpringBootApplication
public class DemoApplication {@RequestMapping("/name")public String name(Map<String, Object> map) {map.put("name", "Clark");System.out.println("============================================这是一个测试");return "index";}@RequestMapping("/index")@ResponseBodypublic String index(Map<String, Object> map) {map.put("name", "Clark");return "index";}public static void main(String[] args) {SpringApplication.run(DemoApplication.class, args);}}

报错.

============================================这是一个测试
2019-04-13 10:19:25.054  WARN 12100 --- [nio-8080-exec-5] o.s.w.s.r.ResourceHttpRequestHandler     : Path with "WEB-INF" or "META-INF": [WEB-INF/jsp/index.jsp]

浏览器报错:

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.Sat Apr 13 10:19:25 CST 2019
There was an unexpected error (type=Not Found, status=404).
No message available

说明controller 可以正常运行 jsp解析出现问题。
这里我pom.xml 导包需要导入依赖

    <!-- tomcat 依赖包 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-tomcat</artifactId><!--<scope>provided</scope>--></dependency><dependency><groupId>org.apache.tomcat.embed</groupId><artifactId>tomcat-embed-jasper</artifactId><!--<scope>provided</scope>--></dependency><!-- servlet 依赖包 --><dependency><groupId>javax.servlet</groupId><artifactId>javax.servlet-api</artifactId><!--<scope>provided</scope>--></dependency><!-- JSTL (JSP standard Tag Library) JSP 标准标签库 --><dependency><groupId>javax.servlet</groupId><artifactId>jstl</artifactId></dependency>

到这里一般jsp就可以运行了,但是要确定这个依赖被maven 载入(按住ctrl+鼠标右键 看是否可以进入),反正我被这个问题坑了好久。。。最好maven 重新导入一下(org.apache.tomcat.embed)比较重要,没有导入就是404…剩下的就是解析问题了

Springboot 关于jsp报 Path with WEB-INF or META-INF: [WEB-INF/jsp/index.jsp] 错误总结相关推荐

  1. Eclipse下Maven新建Web项目index.jsp报错完美解决(war包)

    Eclipse下Maven新建Web项目步骤 1. 2. 3. 4. 5. 问题描述 最近用eclipse新建了一个maven项目,结果刚新建完成index.jsp页面就报错了,先把错误信息贴出来看看 ...

  2. maven构建web项目,jsp报错解决方法

    当新构建maven web项目时,会发现webapp目录下提示jsp报错,提示找不到类的问题 解决办法: 第一种方法: 直接在pom.xml文件中添加jar包支持 <dependency> ...

  3. springboot使用jsp页面的问题Path with WEB-INF or META-INF: [WEB-INF/jsp/index.jsp]

    浏览器报错: Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing ...

  4. 使用Maven创建Web项目后,jsp引入静态文件提示报错。JSP 报错:javax.servlet.ServletException cannot be resolved to a type...

    用maven创建多模块的web工程后,不同于直接创建普通的web工程. 1.在普通的web工程创建后,在项目中会有tomcat等服务器的jar包,这时创建JSP文件肯定是没有错的: 2.即使是使用ma ...

  5. maven jsp报错javax.servlet.http.HttpServlet“ was not found on the Java Build Path

    maven jsp报错javax.servlet.http.HttpServlet" was not found on the Java Build Path 缺少jar包 <!-- ...

  6. Springboot关于 Circular view path [xxx]: would dispatch back to the current handler URL [xxx] again

    Springboot关于 Circular view path [xxx]: would dispatch back to the current handler URL [xxx] again报错问 ...

  7. springboot使用redisTemplate 报错:APP FAILED TO START Field template in required a single bean redis工具类

    springboot使用redisTemplate 报错: template in com.j.ssm.tool.RedisUtil required a single bean, but 2 wer ...

  8. JSP+Mysql 做一个简单的学生成绩查询web系统

    IDEA基于JSP+Mysql 做一个简单的学生成绩查询web系统 目录 一.相关软件的下载和配置环境 Java环境的下载和配置 (1)IDEA的下载和安装 ​ (2)JdK的安装 Tomcat的下载 ...

  9. springBoot 全局异常处理 报错 : Could not resolve method parameter at index 0 in public .....

    在学习 springboot 的全局异常处理时   ,我写了一个处理异常类 @ControllerAdvice public class ErrorCatchController {@Exceptio ...

最新文章

  1. 升级php_wamp怎么升级php版本
  2. Mysql的左外连接丶右外连接与内连接的区别
  3. java_basic_review(5)java反射荔枝
  4. Spring开发人员知道的一件事
  5. LeetCode 188. 买卖股票的最佳时机 IV(动态规划)
  6. xpwifi热点设置android,教你在XP电脑中开启设置WiFi热点使用的步骤
  7. C++ 构造函数和析构函数
  8. Shiro 常用标签
  9. 如何用免费office表格制作课程表
  10. Theos(二):NIC(New Instance Creator)
  11. 谈谈 WiFi STBC
  12. 【读 深入浅出数据分析】 一日一章 读书第三天 第三章-最优化:寻找最大值
  13. java append 报错_Append HDFS报错 is already the current lease holder
  14. 【MySQL】索引的使用和优化
  15. linux下swf播放工具
  16. Hungry Student Problem_Codeforces
  17. 获取实时股票数据与股票数据接口API
  18. 机器人行走背后的机械原理动画,一文看透
  19. 网络安全和信息安全有什么联系?差异在哪里?
  20. 微信小程序开发入门与实战(组件的使用)

热门文章

  1. Android Studio学习——布局
  2. 年均增长90%的智慧灯杆市场风口正盛,企业该如何迎风而上?
  3. dispose 模式 java_C#使用Dispose模式实现手动对资源的释放
  4. 软件开发人员PMP学习与考试心得
  5. pythonrtk_GPS-RTK 测量的原理和优点都有哪些
  6. 如何打造高效的项目交付团队︱中国联通(江西)工业互联网研究院熊小云
  7. OpenStack Zun组件详解
  8. 表现计算机专业的舞蹈,美学角度分析舞蹈表演中的“眼神”
  9. SQL基础六【使用通配符过滤】
  10. phpcms v9电脑pc站+手机wap移动端双模板共用数据库数据同步可同步生成静态文件