display byte array of jpeg in jsp
Hi All,please give me your solution, thanks.
i have a dvo where it consist of byte array of a picture. while trying to display on jsp ,i could not get the picture.
here is the code i tried
response.setContentType("image/jpeg");
OutputStream outSt = response.getOutputStream();
outSt.write(loDocumentDVO.getFileContents());
// where loDocumentDVO.getFileContents() consist of byte array
outSt.flush();
outSt.close();
|