title: Response Already Commited Error for JSF2 Apache MyFaces
body: <p>Version : </p>
  
  <p>Apache MyFaces 2.1.14 and RichFaces 4.3.5</p>
  
  <p>Issue: </p>
  
  <p>We are migrating from jsf 1.2 to jsf 2. We are facing very strange issue as : </p>
  
  <p>When any ajax operation is performed , we are getting below error and page is not refreshed (or rerended as usual)</p>
  
  <pre><code>org.apache.myfaces.context.servlet.ServletExternalContextImpl setResponseContentType
  SEVERE: Cannot set content type. Response already committed
  </code></pre>
  
  <p>This question is very similar to <a href="https://stackoverflow.com/questions/17908969/jsf-2-0-response-already-commented-ajax">jsf 2.0 response already commented (ajax)</a> , 
  but it seems that no one has answered this question.
  It also comes only at the specific page and same code at other places works fine and this error is very random in nature? </p>
  
  <p>Is this anything to do with apache myfaces ? 
  Please help if any inputs are available .</p>
  
  <p>The xhtml ajax tags causing these issues are :  <code>a4j:commandLink</code> and <code>a4j:ajax</code> </p>