Servlet Exception - getOutputStream () has already been called for this response
1 answer
This will happen if the call is made ServletResponse.getWriter()
while OutputStream
already being created to answer. Only one of getWriter()
or getOutputStream()
can be used to write the response body, not both.
Take a look at the stack trace associated with the exception to see if this is the case. Then if you are trying to use character data (only) getWriter()
or for a binary response use getOutputStream()
.
+9
source to share