V ovladači nebo metodě přidejte níže kód pro obrázek
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
A ve vašem JSP
<img src="${imagetoDisplay}" width="100" height="100"/>