fileDownloadActionListeners needs to delay retrieving OutputStream from the 
response until something needs to be written to the stream
--------------------------------------------------------------------------------------------------------------------------------------

                 Key: TRINIDAD-1817
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1817
             Project: MyFaces Trinidad
          Issue Type: Bug
    Affects Versions: 2.0.0.3-core
            Reporter: Max Starets
            Assignee: Max Starets


The issue may be demonstrated by taking our fileDownloadActionListener demo and 
modifying it to run with Facelets.
After you click on the 'Click for Error" button, you will get an 
UnsupportedOperationException instead of the expected FacesMessage.
The exception is thrown because we calling getOutputStream(), but not 
completing the response when we want to report an error.
JSF later calls getWriter(), which is causing UnsupportedOperationException.

This problem does not show up with JSPs because of the side effect of the JSP 
engine dispatch - getWriter() simply succeeds.

The solution is to create a proxy OutputStream that retrieves the delegate 
stream only when it needs to write.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to