Di Controller atau metode Anda, tambahkan kode di bawah ini untuk gambar
BASE64Encoder base64Encoder = new BASE64Encoder();
StringBuilder imageString = new StringBuilder();
imageString.append("data:image/png;base64,");
imageString.append(base64Encoder.encode(bytes)); //bytes will be image byte[] come from DB
String image = imageString.toString();
modelView.put("imagetoDisplay",image);// put in your model object for using in your JSP
Dan di JSP Anda
<img src="${imagetoDisplay}" width="100" height="100"/>