How can I return and output stream to the user and display a success message to the user? The user would make a request, the back end will do some work and return a byte array that is in memory. There is no file on disk.
Controller would have the following:
response.getOutputStream().write(baos.toByteArray());
I was thinking about using ajax somehow but couldn't figure out how to do so.