I had a similar problem, or at least sympton when I first started using
MyFaces.
For me it was occurring as a result of redirects however. The solution I
found to the problem was to call the method
"FacesContext.getCurrentInstance().responseComplete()" after every time
that I sent a redirect. This solved the problem instantly.
The page I found that on, (cant remember where Im afraid), suggested
that this was due to a current known bug in MyFaces.
I dont know if thats any help but good luck anyway.
T
(im on tomcat 5.5 and myfaces 1.1.1)
Jeremy Green wrote:
I have a web application that shows a series of pages - each one
containing a set of images. JSF commandButtons and actions are used to
navigate between the pages. The images are generated by a Servlet, and
take a while (hundreds of ms each) to generate and download.
If a page is submitted before all the images are downloaded, more
often than not, a blank response is displayed and an
IllegalStateException / ServletException (depending on whether Tomcat
5.5 or 5.0 is being used) is thrown with the message:
"Cannot forward after response has been committed."
The problem is made worse by a slow server, a fast connection to the
server, and if the JSF page and images take a long time to generate.
Unfortunately, this makes the application unusable :-(.
I have created a JIRA entry for this bug, and give a simplified test
case that demonstrates the problem (a single page containing a no-op
commandButton and a graphicImage linked to a "SlowServlet"):
http://issues.apache.org/jira/browse/MYFACES-612
Has anyone else seen this problem? Does anyone have any ideas about
how to work around it? How might I work out how to fix MyFaces?
As the stack traces in the JIRA entry show, the exception is thrown
when the ViewHandler tries to dispatch the request to the JSP page to
render the response. Perhaps something in MyFaces is flushing the
FacesServlet output buffer prematurely? The size of the page in the
test case is well below the 8k standard buffer size, but my
understanding is that nothing should be written to the output buffer
before the dispatch to the JSP page.
Jeremy
--
Tim Davies
Analyst Developer
KTS PLC: Service you can bank on
8th Floor, Finsbury Tower,
103-105 Bunhill Row,
London EC1Y 8TY
tel: +44 (0)20 7256 2300
fax: +44 (0)20 7256 2301
email: [EMAIL PROTECTED]
web: http://www.ktsplc.com