This is a known bug in Mojarra. It has been reported as issues 2215 and 2277 and has been fixed since Mojarra 2.1.8. So if you upgrade to at least 2.1.8, then this problem should disappear.
The cause of this problem can be explained as follows: Mojarra is trying to postpone the session creation as much as possible. The session should only be created at the moment when it is really needed. Among others, when the JSF view state of the
needs to be written, which normally happens during rendering of the closing
. However, on relatively large pages wherein the closing
appears after 2KB of written HTML, then it's too late to create the session. To create a session the server namely needs to set a cookie. However, to set a cookie, the response should not have been committed (the cookie namely needs to go in the response header). A server is by default configured to flush the response on every 2KB of written HTML.
As said, this issue is been fixed since Mojarra 2.1.8. You can download the latest version here.