On Jan 15, 2008, at 1:45 PM, Huitang Li wrote:

> Hi,
>
> When we upgrade to resin3.1.4 from resin 2, we got the following error
> when we access a page:
>
> java.lang.IllegalStateException: forward() not allowed after buffer  
> has
> committed.
> [14:20:59.218]     at
> com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:1002)
> [14:20:59.218]     at
> _jsp._aaa._bbb._ccc__jsp._jspService(_ddd__jsp.java:128)
> (  <===== corresponding to ddd.jsp )
> ......
>
> In ddd.jsp, the line is
>
>     <jsp:include page="/eee.do"></jsp:include>

You might need to set flush="false" (although I thought we'd reversed  
that change).

The exception is thrown when you try to forward/redirect after some  
data has been flushed to the browser (which makes forwarding/ 
redirection impossible.)

-- Scott

>
>
> I debugged with  resin 3.1.4 source code, and found that the exception
> is thrown from the following lines in the class  
> RequestDispatcherImpl in
> package com.caucho.server.webapp:
>
>    if (res.isCommitted() && method == null) {
>       IllegalStateException exn;
>       exn = new IllegalStateException("forward() not allowed after
> buffer has committed.");
>
>       if (cauchoRes == null || ! cauchoRes.hasError()) {
>     if (cauchoRes != null)
>       cauchoRes.setHasError(true);
>         throw exn;
>       }
>
>       _webApp.log(exn.getMessage(), exn);
>     }
>
> One interesting thing is that when the jsp page is accessed for the
> first time, it is forwarded to the error page with such exception.
> However, the jsp page is correctly rendered in following  requests  
> even
> though the same exception is generated.
>
> Does anyone know the solution?
>
> Thanks.
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to