Bonjours à tous,
Pourriez vous m'aider à afficher une image sur une page JSP.
Le nom de mon image est stocker dans un base de donnée, j'ai réussi à afficher le nom de l'image.
Mes images se trouve dans un sous dossier nommé img, j'ai pourtant utilisé la balise html <img src='....
concour est un objet qui contient bien le nom de l'image, pas le chemin juste le nom.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 out.print("" + "</div>"+ "</td>" + "<td valign='top' width='100'>" + concour.getGain() + "</td>" + "<td valign='top' width='100'>" + concour.getDepot() + "</td>" + "<td valign='top' width='100'>" + question + "</td>" + //Afficher simplement Oui ou non selon que concour.getAvecQuestion egal 1 ou 0 "<td valign='top' width='100'>" + concour.getNbrGagnant() + "</td>" + "<td valign='top' width='100'>" + concour.getNbrGain() + "</td>" + "<td valign='top' width='100'>" + concour.getCommentaire() + "</td>" + "<td valign='top' width='100'><img src='img/" + concour.getImg() + "'/></td>" + "</tr>");
Comment afficher une image dont j'ai récupéré sont nom depuis ma base de donnée
Merci
Partager