Exception: Cannot forward after response has been committed!

Discussions

General J2EE: Exception: Cannot forward after response has been committed!

  1. I'm using JBoss 3.0.8 for a "simple" web application that use JSP and Servlet...
    After deploy of my web app, I'm trying to open the main page "index.jsp", but an error occured:

    java.lang.IllegalStateException: Cannot forward after response has been committed
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:368)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
    at myPackage.MyDispatcherHelper.forward(MioDispatcherHelper.java:213)
    at myPackage.MyDispatcherHelper.dispatch(MioDispatcherHelper.java:50)
    at myPackage.MyControllerServlet.doPost(MioControllerServlet.java:25)
    at myPackage.MyControllerServlet.doGet(MioControllerServlet.java:19)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.jboss.web.catalina.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:227)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
    at java.lang.Thread.run(Thread.java:534)
    [/code]

    "index.jsp" redirects (as I wrote into [i]WEB.xml[/i] file) to "/controller"

    <HEAD>
        <META HTTP-EQUIV="Refresh" CONTENT="0;url=controller?operation=operatioToDo"/>
    </HEAD>

    The "ControllerServlet" recalls onother servlet, called "DispatcherServlet", wich does a "forward" respect the operation requested (operation=operationToDo)

    for example, in DispatcherServlet, you see this:

    ...
    if( operation.equals( "mp3.show" ) ) {
       forward( "/mp3/ShowMp3.jsp", req, res );
    ...

    I don't understand why this exception is thrown!
    I do a "forward" only one time!
    Where I wrong?

    Thank's, Francesco!

    PS sorry for my bad english! :)

    Threaded Messages (4)

  2. Looks like you have accessed a ServletOutputStream or PrintWriter in your code before forward method is called.
  3. PLEASE HELP ME!!![ Go to top ]

    Nothing!! but thanks for the interest!!
    JBoss console shows this output (I think that it can help to resolve my problem!):

    11:30:37,538 ERROR [STDERR] java.lang.NullPointerException
    11:30:37,538 ERROR [STDERR] at org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:172)
    11:30:37,538 ERROR [STDERR] at org.apache.jsp.Catalogue_jsp._jspx_meth_c_set_2(Catalogue_jsp.java:376)
    11:30:37,538 ERROR [STDERR] at org.apache.jsp.Catalogue_jsp._jspx_meth_c_otherwise_0(Catalogue_jsp.java:348)
    11:30:37,548 ERROR [STDERR] at org.apache.jsp.Catalogue_jsp._jspx_meth_c_choose_0(Catalogue_jsp.java:260)
    11:30:37,548 ERROR [STDERR] at org.apache.jsp.Catalogue_jsp._jspService(Catalogue_jsp.java:103)
    11:30:37,548 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
    11:30:37,548 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    11:30:37,548 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
    11:30:37,548 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    11:30:37,548 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    11:30:37,548 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
    11:30:37,548 ERROR [STDERR] at myPackage.MyDispatcherHelper.forward(MyDispatcherHelper.java:213)
    11:30:37,548 ERROR [STDERR] at myPackage.MyDispatcherHelper.catalogue(MyDispatcherHelper.java:59)
    11:30:37,548 ERROR [STDERR] at myPackage.MyDispatcherHelper.dispatch(MyDispatcherHelper.java:41)
    11:30:37,548 ERROR [STDERR] at myPackage.MyControllerServlet.doPost(MyControllerServlet.java:25)
    11:30:37,548 ERROR [STDERR] at myPackage.MyControllerServlet.doGet(MyControllerServlet.java:19)
    11:30:37,548 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    11:30:37,548 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    11:30:37,548 ERROR [STDERR] at org.jboss.web.catalina.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:227)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    11:30:37,558 ERROR [STDERR] at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    11:30:37,558 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
    11:30:37,558 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
    11:30:37,558 ERROR [STDERR] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
    11:30:37,558 ERROR [STDERR] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
    11:30:37,558 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534)
    11:30:39,721 ERROR [Engine] StandardWrapperValve[Controller]: Servlet.service() for servlet Controller threw exception
    java.lang.IllegalStateException: Cannot forward after response has been committed
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:368)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
            at myPackage.MyDispatcherHelper.forward(MyDispatcherHelper.java:213)
            at myPackage.MyDispatcherHelper.dispatch(MyDispatcherHelper.java:50)
            at myPackage.MyControllerServlet.doPost(MyControllerServlet.java:25)
            at myPackage.MyControllerServlet.doGet(MyControllerServlet.java:19)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.jboss.web.catalina.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:227)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
            at java.lang.Thread.run(Thread.java:534)11:30:37,538 ERROR [STDERR] java.lang.NullPointerException
    11:30:37,538 ERROR [STDERR] at org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(SetSupport.java:172)
    11:30:37,538 ERROR [STDERR] at org.apache.jsp.Catalogue_jsp._jspx_meth_c_set_2(Catalogue_jsp.java:376)
    11:30:37,538 ERROR [STDERR] at org.apache.jsp.Catalogue_jsp._jspx_meth_c_otherwise_0(Catalogue_jsp.java:348)
    11:30:37,548 ERROR [STDERR] at org.apache.jsp.Catalogue_jsp._jspx_meth_c_choose_0(Catalogue_jsp.java:260)
    11:30:37,548 ERROR [STDERR] at org.apache.jsp.Catalogue_jsp._jspService(Catalogue_jsp.java:103)
    11:30:37,548 ERROR [STDERR] at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
    11:30:37,548 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    11:30:37,548 ERROR [STDERR] at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
    11:30:37,548 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    11:30:37,548 ERROR [STDERR] at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    11:30:37,548 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
    11:30:37,548 ERROR [STDERR] at myPackage.MyDispatcherHelper.forward(MyDispatcherHelper.java:213)
    11:30:37,548 ERROR [STDERR] at myPackage.MyDispatcherHelper.catalogue(MyDispatcherHelper.java:59)
    11:30:37,548 ERROR [STDERR] at myPackage.MyDispatcherHelper.dispatch(MyDispatcherHelper.java:41)
    11:30:37,548 ERROR [STDERR] at myPackage.MyControllerServlet.doPost(MyControllerServlet.java:25)
    11:30:37,548 ERROR [STDERR] at myPackage.MyControllerServlet.doGet(MyControllerServlet.java:19)
    11:30:37,548 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    11:30:37,548 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    11:30:37,548 ERROR [STDERR] at org.jboss.web.catalina.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:227)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    11:30:37,548 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    11:30:37,558 ERROR [STDERR] at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    11:30:37,558 ERROR [STDERR] at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    11:30:37,558 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
    11:30:37,558 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
    11:30:37,558 ERROR [STDERR] at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
    11:30:37,558 ERROR [STDERR] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
    11:30:37,558 ERROR [STDERR] at java.lang.Thread.run(Thread.java:534)
    11:30:39,721 ERROR [Engine] StandardWrapperValve[Controller]: Servlet.service() for servlet Controller threw exception
    java.lang.IllegalStateException: Cannot forward after response has been committed
            at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:368)
            at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)
            at myPackage.MyDispatcherHelper.forward(MyDispatcherHelper.java:213)
            at myPackage.MyDispatcherHelper.dispatch(MyDispatcherHelper.java:50)
            at myPackage.MyControllerServlet.doPost(MyControllerServlet.java:25)
            at myPackage.MyControllerServlet.doGet(MyControllerServlet.java:19)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.jboss.web.catalina.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:227)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
            at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
            at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
            at java.lang.Thread.run(Thread.java:534)

    PLEASE, HELP ME!!!!!!!!!!!!!!!!
  4. PLEASE HELP ME!!![ Go to top ]

    You can't forward after you wrote data (in this case - inside the html). Try moving the forward before any html is written.

    David
  5. Problem was another one![ Go to top ]

    Thanks for interest, but problem was onother one! I used taglibs for getting attributes from one of my JavaBean, as you can see in stack trace... this JavaBean uses another class that threw an Exception, so 'get' method of JavaBean failed and jsp... "forward exception" is only a consequence of this fact!
    bye! and thanks!