"Cannot create a session after the response has been committed" error from Tomcat or JBoss
Issue
- The following error is seen when some JSP pages are being rendered.
org.apache.jasper.runtime.JspFactoryImpl internalGetPageContext
ERROR : Exception initializing page context
java.lang.IllegalStateException: Cannot create a session after the response has been committed
at org.apache.catalina.connector.Request.doGetSession(Request.java:2862)
at org.apache.catalina.connector.Request.getSession(Request.java:2307)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:897)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 5.x
- 6.x
- Red Hat JBoss Enterprise Web Server (EWS)
- 1.x
- 2.x
- 3.x
- Tomcat
- 5.x
- 6.x
- 7.x
- 8.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.