Board index JavaServer Faces General How response can be committed before action method finishes

How response can be committed before action method finishes

Components, Ajax Framework, Utilities and More.


Posts: 273
The following error message is shown when an action method of a <h:commandLink/> JSF tag is called:

PWC3999: Cannot create a session after the response has been committed

The meaning of the error message is very straightforward, but my question is how the response could have been committed before the action method finishes execution.

(This error is only occurring time to time, not every time the commandLink is clicked.)
JSF implementation: Mojarra V2.1.7
JSF component library: Primefaces V3.1.1
Server: GlassFish Open Source Edition V3.1.1 (build 12)


Posts: 5976
Howard

PrimeFaces 5.1, Extensions 3.0.0, Push (Atmosphere 2.2.3)
TomEE+ 1.7.1 (Tomcat 7.0.55), MyFaces Core 2.2.5, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache


Posts: 142
Location: Canada
The workaround in this post solved the issue for me:
http://forum.primefaces.org/viewtopic.php?f=3&t=13151#p43963

It involves using a 'pre-render view' event and forcing the session to be created early in the rendering phase.
PF 3.0,
Mojarra 2.1.4,
Tomcat 7.0.14,
Eclipse Indigo,
IE 7, Chrome

Image
http://stackoverflow.com/users/346112/jim-tough

Would rather be a Decepticon...


Posts: 5976
Jim,

I wonder if the preRenderViewEvent and applicationScopeBean would solve the p:schedule issue that myself and this other person has been experiencing. Please see posts below. I've provided my code in the last link below.

http://forum.primefaces.org/viewtopic.php?f=3&t=16339

http://forum.primefaces.org/viewtopic.php?f=3&t=15689

http://stackoverflow.com/questions/7862388/pschedule-not-populating-with-data-and-page-refreshing-infinitely


Thanks,
Howard
Howard

PrimeFaces 5.1, Extensions 3.0.0, Push (Atmosphere 2.2.3)
TomEE+ 1.7.1 (Tomcat 7.0.55), MyFaces Core 2.2.5, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache


Return to General