users@glassfish.java.net

Re: PWC3999: Cannot create a session after the response has ...

From: <forums_at_java.net>
Date: Tue, 11 Oct 2011 13:12:08 -0500 (CDT)

Looking at the stack trace, it seems that an exception was raised in your
first JSP page, and the error page handler includes another JSP page, perhaps
to output an error message.  The 2nd JSP page tries to create an session,
which cannot be done if the response buffer has been committed, because by
that time the header has already been written.

Increasing the response buffer size might might temporarily "fix" this
problem, because it delays the time that the response will be committed, but
the problem will occur again later, once the buffer is full.

So you should really figure out the real cause for the exception and fix
that!

You can also prevent the creation of a new session in the 2nd JSP page by
adding the directive:

<%_at_page session="false" %>
That way, at least you can see what it is trying to tell you.


--
[Message sent by forum member 'kchung']
View Post: http://forums.java.net/node/851888