hi,
I am able to display a single image from the database on a webpage using the following code:
rs1 = st1.executeQuery("select image from pictures where id='5'");
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();
Can any one help me to get the code to display more than one image on a *.jsp
file. I tried putting the while loop, but it is'nt doing the job.
Thanks.