文档章节

@ResponseBody as the response has already been committed.

yizhichao
 yizhichao
发布于 2017/02/16 19:14
字数 268
阅读 332
收藏 0

这种情况是 页面跳转 增加了 @ResponseBody 2017-02-16 19:08:09.131 DEBUG [catalina-exec-8][FilterChainProxy.java:200] - /WEB-INF/jsp/page/newsList.jsp has no matching filters 2017-02-16 19:08:09.132 DEBUG [catalina-exec-8][RequestContextFilter.java:104] - Cleared thread-bound request context: org.apache.catalina.connector.RequestFacade@64327ce7 2017-02-16 19:08:09.132 ERROR [catalina-exec-8][ErrorPageFilter.java:204] - Cannot forward to error page for request [/newsList] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false

这种情况是页面不存在 2017-02-16 19:14:13.561 ERROR [catalina-exec-2][ErrorPageFilter.java:204] - Cannot forward to error page for request [/newsList] as the response has already been committed. As a result, the response may have the wrong status code. If your application is running on WebSphere Application Server you may be able to resolve this problem by setting com.ibm.ws.webcontainer.invokeFlushAfterService to false

    @ResponseBody
    @RequestMapping("/newsList")
    public ModelAndView newsList()
        throws Exception
    {
        LiveNewsInfo newsInfo = new LiveNewsInfo();
       List<LiveNewsInfo> newsList = liveNewsInfoMapper.selectLiveNewsInfoList(newsInfo);
//        newsInfo.setPageNum(pageNum);
//        newsInfo.setPageCount(10);
//      // 页面位置 /WEB-INF/jsp/page/page1.jsp
        ModelAndView mav = new ModelAndView("page/newsList");
        mav.addObject("newsList", newsList);
        return mav;
    }
    
    /**
     * 响应到JSP页面page1
     *
     * @return
     * @author SHANHY
     * @create 2016年1月5日
     */
    @RequestMapping("/page1")
    public ModelAndView page1()
    {
        // 页面位置 /WEB-INF/jsp/page/page1.jsp
        ModelAndView mav = new ModelAndView("page/page1");
        mav.addObject("content", hello);
        return mav;
    }

© 著作权归作者所有

共有 人打赏支持
yizhichao

yizhichao

粉丝 14
博文 460
码字总数 362508
作品 0
南京
程序员
私信 提问
MVP中的HttpUntils

private static final HttpUntils ourInstance = new HttpUntils(); public static HttpUntils getInstance() { return ourInstance; } private HttpUntils() { } public static void getDat......

津乐
2018/01/21
0
0
【Spring reference】@ResponseBody注解

Spring reference写到: Mapping the response body with the @ResponseBody annotation The @ResponseBodyannotation is similar to @RequestBody. This annotation can be put on a method......

666B
2014/07/02
0
0
Spring MVC ResponseBody

上一节小博老师跟大家一起学习了RequestBody注解的适用情况,了解了在什么情况下使用以及如何使用RequestBody注解。这一节小博老师继续给大家讲解Controller方法上的另一个注解ResponseBody。...

博为峰教研组
2016/12/07
30
0
java.lang.IllegalStateException异常产生的原因及解决办法

问题描述: 错误类型大致为以下几种: java.lang.IllegalStateException:Cannot forward a response that is already committed IllegalStateException:response already commited Illegal......

IT妖姬
2014/04/14
0
0
postman断言解析

一个post请求的响应结果为: 说明:返回status状态为200 说明:响应结果中是否含有你想搜索的内容。适用于响应结果内容较多的接口 如例子,检查响应结果中是否含有“修改成功”内容 说明:响应...

北_木
2016/10/08
6
0

没有更多内容

加载失败,请刷新页面

加载更多

MySQL学习笔记之二

数据库的操作总结就是:增删改查(CURD),今天记录一下基础的检索查询工作。 检索MySQL 1.查询表中所有的记录 mysql> select * from apps;+----+------------+-----------------------+------...

凌宇之蓝
24分钟前
0
0
PaddlePaddle-GitHub的正确打开姿势

GitHub是一个面向开源及私有软件项目的托管平台、也是项目版本管理工具,会使用它是程序员入门的必备技能。PaddlePaddle也不例外,所有的源码及项目进展都在GitHub上开源公布。但对于刚入门写...

深度学习之路
24分钟前
1
0
最强NLP模型BERT可视化学习

摘要: 最强NLP模型谷歌BERT狂破11项纪录,全面超越人类,本文通过可视化带你直观了解它。 2018年是自然语言处理(Natural Language Processing, NLP)领域的转折点,一系列深度学习模型在智...

阿里云官方博客
31分钟前
1
0
导出功能

public void downloadD(HttpServletRequest request, HttpServletResponse res,String contractName, String contractPath) throws IOException {// FileAttach fileAttach = fileA......

卖星星的小矮人
35分钟前
1
0
gradle 打包可执行jar包

group 'android.com'version '1.0-SNAPSHOT'apply plugin: 'java'sourceCompatibility = 1.8repositories { mavenCentral()}jar { manifest { attributes ('Main-......

zdglf
46分钟前
0
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部