ajax - Response Already Commited Error for JSF2 Apache MyFaces -


version :

apache myfaces 2.1.14 , richfaces 4.3.5

issue:

we migrating jsf 1.2 jsf 2. facing strange issue :

when ajax operation performed , getting below error , page not refreshed (or rerended usual)

org.apache.myfaces.context.servlet.servletexternalcontextimpl setresponsecontenttype severe: cannot set content type. response committed 

this question similar jsf 2.0 response commented (ajax) , seems no 1 has answered question. comes @ specific page , same code @ other places works fine , error random in nature?

is apache myfaces ? please if inputs available .

the xhtml ajax tags causing these issues : a4j:commandlink , a4j:ajax

that occurs because there error on render response phase , part of response has been send client. algorithm try render error page can't because response has been sent problem.

the solution avoid commit, increasing buffer size of response. use javax.faces.facelets_buffer_size web config parameter (by default 1024 bytes).

theoretically param has negative effect on memory, because larger buffer, more memory allocated that, jvm fast enough if there enough memory.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -