My method is acquiring HttpServletResponse from previous method to which I do not have access.When using HttpServletResponse::reset()
I'm able to write my .zip content to this response with OutputStream
, but on cost of losing all the data. On the other hand, when I do not use reset() function and try to use the OutputStream the IllegalStateException: Already using writer is being thrown.
Does anyone know the solution for this issue?
I've already tried some wrappers etc. but without any acceptable outcome.