Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Viewing all articles
Browse latest Browse all 714

How to write to HttpServletResponse using OutputStream

$
0
0

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.


Viewing all articles
Browse latest Browse all 714

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>