Adding causes java.lang.IllegalStateException: Cannot create a session after the response has been committed

后端 未结 5 488
南旧
南旧 2020-11-22 14:09

I\'m facing the following exception in a very simple JSF 2 page after adding :

java.lang.IllegalStateException: Cannot create a se         


        
5条回答
  •  伪装坚强ぢ
    2020-11-22 15:06

    In my case (myfaces-2.2.8 & Tomcat 8.0.23) the Problem was a typo in the welcome-file of web.xml. While debugging i saw, that Tomcat created as expected a 404, but somehow myfaces tried to access afterwards the Session, which caused then a java.lang.IllegalStateException: Cannot create a session after the response has been committed. Using a valid page in welcome-file of web.xml fixed the Problem for me.

提交回复
热议问题