This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.