java.lang.IllegalStateException: getWriter() has already been called for this response
Error while executing this code:
OutputStream out = response.getOutputStream();
By searching for data analysis, Response.getWriter() has already been opened, so an error will be reported when getting getOutputStream again. because
getWriter() and getOutputStream() cannot be called simultaneously in the same response.
When I see usingWriter=true in the response, I immediately find a way to set the flag to false.
response.reset(); That's it, note that the cache disappears after reset.