Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: EE-3.2.0.BETA
-
Fix Version/s: EE-3.2.0.GA
-
Component/s: None
-
Labels:None
-
Environment:WebSphere Application Server 7/8, ICEfaces 3
-
Affects:Documentation (User Guide, Ref. Guide, etc.), Compatibility/Configuration
-
Workaround Description:
Description
The following warning can appear in the logs when running a stock ICEfaces application on WAS 7/8:
W com.ibm.ws.webcontainer.srt.SRTServletResponse setIntHeader SRVE8094W: WARNING: Cannot set header. Response already committed.
W com.ibm.ws.webcontainer.srt.SRTServletResponse setIntHeader SRVE8094W: WARNING: Cannot set header. Response already committed.
This is possibly due to Mojarra. I can reproduce it with Mojarra 2.1.17 as well. The last line on the ICEfaces end that gets executed is:
resourceHandler.handleResourceRequest(facesContext);
Down the line, Mojarra does the following eventually:
for (int thisRead = resourceChannel.read(buf), totalWritten = 0;
thisRead != -1;
thisRead = resourceChannel.read(buf)) {
buf.rewind();
{ totalWritten += out.write(buf); }buf.limit(thisRead);
do
while (totalWritten < size);
buf.clear();
size += thisRead;
}
extContext.setResponseContentLength(size);
Here you can see that it first tries to write the contents and at the end it sets the Content-Length. This should be the other way around. As a simple test I removed the last line and tested again. The warnings went away.