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.
Activity
Jack Van Ooststroom
created issue -
Jack Van Ooststroom
made changes -
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 3.3 [ 10370 ] |
Jack Van Ooststroom
made changes -
Assignee | Jack Van Ooststroom [ jack.van.ooststroom ] |
Jack Van Ooststroom
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Ken Fyten
made changes -
Ken Fyten
made changes -
Affects | Documentation (User Guide, Ref. Guide, etc.),Compatibility/Configuration [ 10003, 10002 ] |
Ken Fyten
made changes -
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Resolution | Won't Fix [ 2 ] |
Jack Van Ooststroom
made changes -
Workaround Description |
When experiencing these warnings, depending on the library being used add one of the following snippets to the ICEfaces application's web.xml.
Mojarra: <context-param> <param-name>com.sun.faces.resourceBufferSize</param-name> <param-value>524288</param-value> </context-param> MyFaces: <context-param> <param-name>org.apache.myfaces.RESOURCE_BUFFER_SIZE</param-name> <param-value>524288</param-value> </context-param> Note that the value can be changed as desired. |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
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.