严重: Servlet.service() for servlet [default] in context with path [/20161101-struts2-1] threw exception
java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
at org.apache.catalina.connector.ResponseFacade.sendError(ResponseFacade.java:462)
at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:726)
at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:398)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at com.tt.struts2.helloworld.FilterDispatcher.doFilter(FilterDispatcher.java:44)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2508)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2497)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

代码如下:

分析:不知道为什么,还需要研究

解决办法:请求转发之后加上return

报错:java.lang.IllegalStateException: Cannot call sendError() after the response has been committed(待解答)的更多相关文章

  1. java.lang.IllegalStateException: Cannot call sendError() after the response has been committed

    http://blog.csdn.net/chenghui0317/article/details/9531171 —————————————————————————————————————————— ...

  2. java.lang.IllegalStateException: Cannot call sendError() after the response has been committed解读

    源代码: @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Ob ...

  3. java.lang.IllegalStateException: Cannot call sendError() after the response has been committe

    1.问题描述 严重: Servlet.service() for servlet [default] in contextwith path [/OxygenCloud] threw exceptio ...

  4. eclipse启动报错java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' befo

    报错: java.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invo ...

  5. 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"

    在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...

  6. springboot测试启动报错java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you need to use @ContextConfiguration or @SpringBootTest(classes=...) with your test

    springboot测试启动报错: java.lang.IllegalStateException: Unable to find a @SpringBootConfiguration, you ne ...

  7. Java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed

    在使用response重定向的时候,报以下错误:Java.lang.IllegalStateException: Cannot call sendRedirect() after the respon ...

  8. Spring Scheduled定时任务报错 java.lang.IllegalStateException: Encountered invalid @Scheduled method 'xxx': For input string: "2S"

    报错信息如下: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ding ...

  9. spring mvc处理http请求报错:java.lang.IllegalStateException: getInputStream() has already been called for this request

    发送post请求到controller处理失败,报错日志如下: java.lang.IllegalStateException: getInputStream() has already been c ...

随机推荐

  1. Codeforces Round #368 (Div. 2)A B C 水 图 数学

    A. Brain's Photos time limit per test 2 seconds memory limit per test 256 megabytes input standard i ...

  2. leetcode 132. Palindrome Partitioning II ----- java

    Given a string s, partition s such that every substring of the partition is a palindrome. Return the ...

  3. Linux驱动设计—— 中断与时钟@request_irq参数详解

    request_irq函数定义 /*include <linux/interrupt.h>*/ int request_irq(unsigned int irq, irq_handler_ ...

  4. java编程之:生成rsa密钥

    通过openssl工具生成RSA的公钥和私钥(opnssl工具可在互联网中下载到,也可以点此下载无线接口包,里面包含此工具) 打开openssl文件夹下的bin文件夹,执行openssl.exe文件: ...

  5. Python小白好教程

    提供一些Python的基础教程. Crossin的编程教师:网址:http://crossincode.com/home/ 廖雪峰的官方网站 网址:http://www.liaoxuefeng.com ...

  6. 学习笔记之 初试Caffe,Matlab接口提取feature

    Caffe 提供了matlab接口,可以用于提取图像的feature.

  7. ES

    https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-service-win.html https://www.e ...

  8. Git图文教程:从零到上传GitHub项目

    一:安装Git 从Git官网下载.安装客户端 二:本地建立代码仓库 在开始菜单中找到 Git Bash 并打开 配置身份 git config --global user.name "pen ...

  9. Partial RenderPartial Action RenderAction 区别和用法

    区别: 1.Partial 与 RenderPartial 两个方法性质基本一样,只是把一个静态用户控件给嵌入进来. 2.Partial 回传一堆html代码,直接写进到页面上@Html.Partia ...

  10. bing统计【转自CSDN博客】

    文章来源:http://blog.csdn.net/aa512690069/article/details/17918799 其原文是微软一个小题目:http://hero.csdn.net/Ques ...