if I’m generating images using servlets/actions something like this:
byte[] imageBytes = getImageAsBytes();
response.setContentType("image/jpeg");
response.setContentLength(imageBytes.length);
response.getOutputStream().write(imageBytes);
when user access the servlet, where are those images storing? will it download to user temp folder and load it o it’s saving user HTTP_SESSION?
domain.com/image/randomImageServlet?param1=a¶m2=b
It isn’t stored anywhere except, maybe, in the cache of the browser. Why would you want it to be stored anywhere. You load the bytes in memory, and stream them to the response output stream. They’re just downloaded on the wire exactly like your generated HTML is.