Answer mentioned here This is not working for me I have sent bytes array to the database which is stored as a blob in the database
File file = new File(filePath);
byte[] imageData = new byte[(int) file.length()];
When I try to retrieve the blob object from the database in this byte array
I get a value like this "[B@526d24d9". I send this value to the jsp page.(I am sending a list of blobs to the jsp page i.e a list of bytes array) Now I am trying to render this image on a web page using jsp. But I am not able to figure out the most efficient approach one approach is to retrieve the list of blob ,process it and store it in a file and then retrieve from that filepath in the jsp page using the tag But I am looking for a more efficient approach. I am trying to something like this
jsp code
<c:forEach items="${list}" var="list" varStatus="loop">
<c:set var="l" value="${loop.index}" />
<tr>
<td><c:out value= "${l+1}" /></td>
<td><c:out value="${list.name}" /></td>
<td><c:out value="${list.size} MB" /></td>
<td><c:out value="${list.preview}" /></td>
<td><i class="material-icons">edit</i>
<i class="material-icons" onclick="Remove()">delete</i></td>
</tr>
</c:forEach>
list.preview contains the byte array "[B@526d24d9"