Hi, In my application after few min it throws this exception.. java.lang.IllegalStateException: Cannot create a session after the response has been committed at org.apache.coyote.tomcat5.CoyoteRequest.doGetSession(CoyoteRequest.ja va:2270) at org.apache.coyote.tomcat5.CoyoteRequest.getSession(CoyoteRequest.java :2116) at org.apache.coyote.tomcat5.CoyoteRequestFacade.getSession(CoyoteReques tFacade.java:526)
The session gets set in the the HTTP header, which is the first bit sent to the client. The reposnse is buffered until the buffer is filled and then the header gets sent to the client. At this stage it is too late to tell it you suddenly want a session.
Try calling the session earlier, even if you don't use it. THis will make sure it exists later on.
Joined: Jan 28, 2004
I have not tested myself but I guess your are probably doing this: