This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
You are trying to create a session after the response had been committed. Have you placed a call to flush() or close() method on the response writer before you create the session?
Once you call these, the response is sent to the client and the request is essentially considered to have been served. Also, check out if you have forwarded the request before you create the session in the servlet. One of these must be the reason.