Solution :
1. Usually the error comes when you are writing on the output stream from jsp and then again performing some operation on it.
2. This causes IllegalStateException.
3. You should not perform any operation when the response is already committed.
4. By committed means the response is sent back to the client.
5. A common scenario is
OutputStream stream = response.getOutPutStream();
stream.write("something here");
stream.flush();
RequestDispatcher rd = request.getRequestDispatcher("someFile.jsp");
rd.forward(request, response);// You must not do this as the stream is already written