
I have saved my project and uploaded the picture. But when i want to view the picture, there was no picture. I used the method listEmployeeByID and the bean is
if (rs.next()) { bean.setEmployeephoto(rs.getBytes("employeephoto"));
How to get the correct answer to view the picture by using bytes?

InputStream sImage;
if(rs.next()){
byte[] bytearray = new byte[1048576];
int size=0;
sImage = rs.getBinaryStream(1);
response.reset();
response.setContentType("image/jpeg");
while((size=sImage.read(bytearray))!= -1 ){
response.getOutputStream().write(bytearray,0,size);
}
}

ok i'll try that. thanks anyway.