我正在尝试检索已存储在我的tomcat服务器中的图片,并且我想在我的网页中显示这些图像,但我不知道如何访问或访问它们。 所以我怎么能做到这个
// upload code from my netbeans project
File f = new File("images/" + name + ".png");
OutputStream outputStream = new FileOutputStream(f);
int read;
byte[] bytes = new byte[1024];
while ((read = inp.read(bytes)) != -1) {
outputStream.write(bytes, 0, read);
}
jsp page <img src="?">
答案 0 :(得分:0)
http://example.com/image/FILENAME.jpg
http://example.com/image/../../../../etc/passwd