@ResponseBody as the response has already been committed.
@ResponseBody as the response has already been committed.
yizhichao 发表于9个月前
@ResponseBody as the response has already been committed.
  • 发表于 9个月前
  • 阅读 94
  • 收藏 0
  • 点赞 0
  • 评论 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
粉丝 10
博文 274
码字总数 257129
×
yizhichao
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
* 金额(元)
¥1 ¥5 ¥10 ¥20 其他金额
打赏人
留言
* 支付类型
微信扫码支付
打赏金额:
已支付成功
打赏金额: