I am uploading an image file from database to jsp. I've selected image using SQL as below
select (logo_img_one) from accounts_logo where logo_usrm_id=1
I read the image using binarystream as
InputStream readImg = rs1.getBinaryStream(1);
and made content type as "image/jpeg" as
response.setContentType("image/jpg");
Now I want to know how to use getoutputstream of response to send the image to ajax and how to get in ajax. How can I achieve this?