controller中的代码:
BufferedImage img1 = null;
BufferedImage img2 = null;
if(student.getId_card_scan()!= null | student.getDiploma_scan() != null)
{
ByteArrayInputStream in1 = new ByteArrayInputStream(student.getId_card_scan());
img1 = ImageIO.read(in1);
ByteArrayInputStream in2 = new ByteArrayInputStream(student.getDiploma_scan());
img2 = ImageIO.read(in2);
in1.close();
in2.close();
}
model.addAttribute("id_card_scan",img1);
model.addAttribute("diploma_scan",img2);
在JSP中要怎样才能把图片显示出来