“PWC3999: Cannot create a session after the response has been committed” [duplicate]

蓝咒 提交于 2019-12-05 22:13:42

You're writing JS code in a XHTML file? Most likely the edited JS code contained a XML syntax error which caused a XML parsing exception which in turn forced the container to display a HTTP 500 error page (most probably a custom one for which a session needs to be created), but which failed because the response has already been committed. This is the best scenario I can think about based on the as far given information. In the future questions, please add the entire stacktrace. It contains the answer.

Regardless of the root cause, you need to put JS code in its own JS file which you include by <script src>. The JS language contains several operators which are special characters in XML like &, < and so on, which you would need to XML-escape or wrap in CDATA. But that's plain ugly.

I had the same problem, when I add an extra button without id that exception appear in the log, but when I add the id to the new button the exception disappear. Try putting the id's to the components wich generate the error.

I have to deal with this error myself, but I notice it happens when I test this module alone, starting all my webapp proyect and then trying the module itself prevent that error.

Maybe you wanna try that!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!