问题描述
java.lang.IllegalStateException:Cannotforwardafterresponsehasbeencommittedatorg.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:371)atorg.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:359)atcn.com.csuinfosoft.servlet.ApplicationControl.process(ApplicationControl.java:39)atcn.com.csuinfosoft.servlet.FrontServlet.process(FrontServlet.java:52)atcn.com.csuinfosoft.servlet.FrontServlet.doPost(FrontServlet.java:45)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:763)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:856)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)atcn.com.csuinfosoft.filter.EncodingFilter.doFilter(EncodingFilter.java:26)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)atorg.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)atorg.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)atorg.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)atorg.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)atorg.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)atorg.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)atorg.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)atorg.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)atjava.lang.Thread.run(Thread.java:619)java.lang.NullPointerExceptionatcn.com.csuinfosoft.servlet.ApplicationControl.buildCommand(ApplicationControl.java:51)atcn.com.csuinfosoft.servlet.ApplicationControl.process(ApplicationControl.java:33)atcn.com.csuinfosoft.servlet.FrontServlet.process(FrontServlet.java:52)atcn.com.csuinfosoft.servlet.FrontServlet.doPost(FrontServlet.java:45)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:763)atjavax.servlet.http.HttpServlet.service(HttpServlet.java:856)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)atcn.com.csuinfosoft.filter.EncodingFilter.doFilter(EncodingFilter.java:26)atorg.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)atorg.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)atorg.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)atorg.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)atorg.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)atorg.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)atorg.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)atorg.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)atorg.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)atorg.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)atorg.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)atorg.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)atorg.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)atorg.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)atorg.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:211)atorg.apache.coyote.http11.Http11Processor.process(Http11Processor.java:805)atorg.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:696)atorg.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:605)atorg.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:677)atjava.lang.Thread.run(Thread.java:619)
解决方案
解决方案二:
就这个错误!日!晒都无!这能看出你代码出现空指针!ApplicationControl.java第51行空指针!
解决方案三:
java.lang.IllegalStateException:在非法或不适当的时间调用方法时产生的信号Cannotforwardafterresponsehasbeencommitted在响应之后不能进行跳转应该是你action那个地方写错了,最好是把action方法里面的代码贴出来