1
Well, here’s the thing. I’m using JSP, SERVLET and Mysql to insert images into my project, it turns out I just keep the image path in the database, and then call this path to show the image. Then the problem happens:
<%
ArrayList<Fotos> lista = new ArrayList<Fotos>();
try {
Fotos f = new Fotos();
lista = f.listar();
} catch (Exception e) {
out.print("Erro:" + e);
}
for (Fotos fl : lista) {
%>
<p><%=fl.getId()%><p>
<img src="img/<%fl.getLink()%>">
<td><a href="alterar_foto.jsp?id=<%=fl.getId()%>">alterar</a>/<a href="#" onclick="excluir('<%=fl.getLink()%>', '<%=fl.getId()%>');">excluir</a>
<%
}
%>
The image path on my computer is: C: Users Gabriel Documents Engatfitoriginal web img
only it does not show on the listing page:
Someone knows how to do?
True, it worked. Thank you.
– Gabriel