javax.servlet.ServletException: Circular view path []: would dispatch back to the current....
解决:javax.servlet.ServletException: Circular view path []: would dispatch back to the current…
原因:
当没有声明ViewResolver时,spring会注册一个默认的ViewResolver,就是JstlView的实例, 该对象继承自InternalResoureView。
JstlView用来封装JSP或者同一Web应用中的其他资源,它将model对象作为request请求的属性值暴露出来, 并将该请求通过javax.servlet.RequestDispatcher转发到指定的URL.
Spring认为, 这个view的URL是可以用来指定同一web应用中特定资源的,是可以被RequestDispatcher转发的。
也就是说,在页面渲染(render)之前,Spring会试图使用RequestDispatcher来继续转发该请求。
错误代码:
示例1:
@RequestMapping("/index")
public void query(){//代码内容
}
示例2:
@RequestMapping("/index")
public String query(){//代码内容return null;
}
解决方案:
通过原因分析,造成问题有两个因素:
缺省转发
view和path同名
所以,解决方案如下
1.消除缺省转发
2.修改view和path,让他们不同名
例:
@RequestMapping("/index")
public String query(){//代码内容return "succeed"; //这里需要返回一个和"/index"不同名的view
}
javax.servlet.ServletException: Circular view path []: would dispatch back to the current....相关推荐
- javax.servlet.ServletException: Circular view path [reg]: would dispatch bac
would dispatch back to the current handler URL [/reg] again. Check your View Hint: This may be the r ...
- .ServletException: Circular view path [index]: would dispatch back to the curren这是springboot
Springboot 我访问地址的时候出现以下的代码 javax.servlet.ServletException: Circular view path [index]: would dispatc ...
- springBoot ajax 报错 Circular view path [xx: would dispatch...
2019独角兽企业重金招聘Python工程师标准>>> 报错如下 javax.servlet.ServletException: Circular view path [xx]: w ...
- threw exception [Circular view path [index]: would dispatch back to the current handler URL [/index]
[现象] 2022-07-23 14:54:31.191 [http-nio-8080-exec-9] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - [log ...
- 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报错问 ...
- 如何在Spring MVC Test中避免”Circular view path” 异常
1. 问题的现象 比如在webConfig中定义了一个viewResolver public class WebConfig extends WebMvcConfigurerAdapter {//配置 ...
- javax.servlet.ServletException: Could not resolve view with name 'destination/isOtherExist' in servl
五月 28, 2016 5:36:38 下午 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() fo ...
- javax.servlet.ServletException: Could not resolve view with name ‘***‘ in servlet
javax.servlet.ServletException: Could not resolve view with name 'employee/login' in servlet with na ...
- spring cloud 报[Circular view path [refundbbb]: would dispatch back to the current handler URL [/refu
今天在调试spring cloud的过程中,在启动了一个eureka server ,一个eureka调用者,一个eureka提供者之后.请求在提供者的方法中处理后一直返回不到调用者,报错: [Cir ...
最新文章
- dbc2000找不到服务器控制台,控制面板没有BDE Administrator(安装好DBC2000找不到)
- Chrome开发者工具面板功能
- Linux下计划任务:crontab 命令的权限说明
- 可以响应各个方向CompoundDrawables点击操作的TextView的使用
- 物理化学 热力学第二定律
- 运算符之:5、位运算符(7个)
- C#编写窗体(Form)常用属性
- 6月第1周安全回顾 Flash Player漏洞危机 邮件泄漏敏感信息
- JFreeChart的简单应用及乱码解决
- 舍 bpftrace 而取 systemtap 的代价和思考
- 什么是Mybatis配置解析?(源码+图文)
- 2020互联网大厂中秋礼盒PK!我酸了!
- Windos下的UPD服务器端的C++实现
- linux dropbox自动同步,Linux免dropbox客户端备份脚本
- kettle MongoDB数据迁移至Hbase
- 微擎弹出确认授权获取用户头像
- Spark 报错:Lost task 0.0 in stage 1.0 (TID 2, xxx, executor 0): java.io.FileNotFoundExceptio
- 十二月,我们一起在云台山风景区赏雪
- Java进阶学习资料,java小程序开发面试题
- Axios的二次封装(简单易懂)
热门文章
- linux sudo命令全称,linux sudo命令的概念与使用
- python安卓自动化实现方法_uiautomator +python 实现安卓UI自动化
- linux纯内核直接用吗,Linux:为啥内核有的变量没有初始化就敢直接使用?
- javascript对话框_JavaScript中的对话框
- filterreader_Java FilterReader markSupported()方法与示例
- c+pow函数的头文件_pow()函数以及C ++中的示例
- c#字符相似度对比通用类
- 安卓安装kali linux之Termux
- python深拷贝,浅拷贝,赋值引用
- 计算机中隐藏的文件找不到了怎么办,隐藏文件夹找不到了怎么办【图解】