I'm using Primefaces 4.0 + JSF 2.1 + Bootstrap 3 and when I try put "h:form" in block bellow I got a error:
Caused by: java.lang.IllegalStateException: Cannot create a session after the response has been committed
So, this code bellow throws the error above:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head />
<h:body>
<ui:composition template="/templates/template.xhtml">
<ui:define name="content">
<h:form>
hello world
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
If I remove the "h:form" the 'hello world' is rendered.
I tried this is my web.xml, but didn't work too:
<context-param>
<param-name>
com.sun.faces.writeStateAtFormEnd</param-name>
<param-value>false</param-value>
</context-param>