
Hi, i am new to this forum.
My query is that, i am trying to display image in tag but i am not getting, how to do this by using this code. plz help me.
if(rs1.next())
{
int len = imgLen.length();
byte [] rb = new byte[len];
InputStream readImg = rs1.getBinaryStream(1);
int index=readImg.read(rb, 0, len);
System.out.println("index"+index);
st1.close();
response.reset();
response.setContentType("image/jpg");
response.getOutputStream().write(rb,0,len);
response.getOutputStream().flush();
}
i think, this code will display image, but i am not able to use this in tag of html.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.