| Author |
Populate many images from a Blob to a .JSP
|
André Asantos
Ranch Hand
Joined: Nov 23, 2009
Posts: 234
|
|
How could I do to print on JSP page some images from a Blob, those images were in a byte format and now are in an InputStream format, as I've said
are more than only one picture/image so I put all on an array and now I have a big problem to show on JSP cause only one is shown and I don't know why that
works this way... Look at below to understand completly my big and old problem that does I can't finish my first difficult use case as Junior Java...
struts.xml (Struts2)
Método q pega os registros da base de dados e adiciona no array
Classe responsável pelo Upload das imagens:
|
André AS
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56185
|
|
JSPs are just templates to create HTML pages. As such, images are displayed in a JSP just like in an HTML page. And, in an HTML page, do you embed the binary image data? Of course not. You use <img> tags. Same in a JSP.
So your array of binary image data is useless. What you need to do is to create <img> tags that reference a servlet that will serve each image individually.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Populate many images from a Blob to a .JSP
|
|
|