0

このガイドに従って、ブロブ フィールドから画像を表示する方法を理解しています。

Blob image = null;
byte[ ] imgData = null ;

// here i get the blob and i'm sure that 'image' is not null //////////
image = rsListaNews.getBlob("immagine_principale");    

imgData = image.getBytes(1,(int)image.length());

response.setContentType("image/jpg");
OutputStream o = response.getOutputStream();
o.write(imgData);
o.flush();
o.close();

このエラーが発生します

org.apache.jasper.JasperException: org.apache.jasper.JasperException: An exception occurred processing JSP page /Include/Chiusura.jsp at line 70

67:     
68:         response.setContentType("image/jpg");
69: 
70:     OutputStream o = response.getOutputStream();
71: 
72:     o.write(imgData);
73: 
4

1 に答える 1