Hi All,
I have doubt regarding committing response. As per my knowledge response is committed either when the buffer is full or when we flush the buffer. But my doubt is regarding usage of println() method after the buffer is flushed.
Say I have a code snippet like:
PrintWriter out = response.getWriter();
out.println("This is a test");
out.flush();
out.println(response.isCommitted());
out.println("Test again");
When I try this I am not getting
IllegalStateException, everything works fine. It also displays true for isCommitted() method. Should it be throwing this exception and in case not then does it imply that the output can be sent to client even after the response is committed.
-Rancy