Circular view path [login3]: would dispatch back to the current handler URL [/Spring_Demo/login3]
来源:互联网 发布:cip数据核字号查询打印 编辑:程序博客网 时间:2024/05/20 17:38
最近在学习使用springmvc,遇到了不少的坑,刚刚就遇到了一个,遂记录之
这是一段非常简单的代码,通过lhttp://localhost:8080/Spring_Demo/login3来访问,由前端控制器分发到这里来处理请求,本应该正常跳转的,但是遇到了bug
package fkit.controller;import org.apache.commons.logging.Log;import org.apache.commons.logging.LogFactory;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.ModelAttribute;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.portlet.ModelAndView;import fkit.domain.User;@Controllerpublic class User3Controller {private static final Log logger = LogFactory.getLog(User3Controller.class);@ModelAttributepublic void userModel3(String loginname, String password, ModelAndView mv) {logger.info("userModel3");User user = new User();user.setLoginname(loginname);user.setPassword(password);mv.addObject("user", user);}@RequestMapping(value = "/login3")public ModelAndView login3(ModelAndView mv) {User user = (User) mv.getModel().get("user");user.setUsername("张三");System.out.println(user);mv.setViewName("/WEB-INF/content/result3.jsp");return mv;}}
HTTP Status 500 - Circular view path [login3]: would dispatch back to the current handler URL [/Spring_Demo/login3] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
type Exception report
message Circular view path [login3]: would dispatch back to the current handler URL [/Spring_Demo/login3] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Circular view path [login3]: would dispatch back to the current handler URL [/Spring_Demo/login3] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)org.springframework.web.servlet.view.InternalResourceView.prepareForRendering(InternalResourceView.java:205)org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:145)org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1282)org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)javax.servlet.http.HttpServlet.service(HttpServlet.java:622)org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)javax.servlet.http.HttpServlet.service(HttpServlet.java:729)org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.39 logs.
0 0
- Circular view path [login3]: would dispatch back to the current handler URL [/Spring_Demo/login3]
- Circular view path [...]: would dispatch back to the current handler
- Circular view path [...]: would dispatch back to the current handler
- Circular view path : would dispatch back to the current handler URL again. Check your ViewResolver s
- Circular view path [faults]: would dispatch back to the current handler URL [/pulsar/faults] again
- spring cloud 报[Circular view path [refundbbb]: would dispatch back to the current handler URL [/refu
- 《Springboot极简教程》问题解决:javax.servlet.ServletException: Circular view path [login]: would dispatch back to the current handler URL
- Spring boot 报错:Circular view path [...]: would dispatch back to the current handler
- javax.servlet.ServletException: Circular view path [list]: would dispatch back to the current handle
- javax.servlet.ServletException: Circular view path [index]: would dispatch back to the current handl
- spring boot would dispatch back to the current handler URL [/hello] again. Check your ViewResolver s
- Circular view path
- PHP: How to Get the Current Page URL
- Cannot map handler 'algorithmPlatform' to URL path [/execute.do]: There is already handler of type
- 今天踩了个大坑,springmvc的Circular view path
- javax.servlet.ServletException: Circular view path......Check your ViewResolver setup!
- spring boot thymeleaf错误之Circular view path [...]
- Software Engineering: A Look Back and A Path to the Future
- CSDN日报20170402 ——《我希望进入大学时就能知道的一些事儿》
- sdut离散题目11
- libevent源码分析
- 为什么static成员必须在类外初始化
- TensorFlow练习16: 根据大脸判断性别和年龄
- Circular view path [login3]: would dispatch back to the current handler URL [/Spring_Demo/login3]
- I ajax模糊搜索(PDO方式查询)
- cmake mysql 配置
- Linux基础概念
- Hadoop2.X MR作业流
- TensorFlow练习12: 判断男声女声
- 组合数学——Codeforces Round #404 (Div. 2) D. Anton and School
- 1570 去看电影
- socket