how to show an uploaded image on jsp page

有些话、适合烂在心里 提交于 2019-12-11 08:16:45

问题


when I am uploading an image into serverside, and saved in a specific folder. Then on the next page I have to show that uploaded image. But I cant show it using the html img tag . what is wrong with this?.Can any one help me to solve this problem?


回答1:


You likely need to make sure that the folder that you are uploading the images is accessible through the web server your are using, this would mean both that it's location is mapped to something on the web server and also that the web server has permission to read the image files after they have been created.

I would start by looking to make sure that the files are actually showing up in the folder that you expect them to be in, and that they aren't being cleared out by something.

Second, check if you manually place an image in that folder if you can navigate to the url of the image. If you can't it likely isn't mapped or there is a permissions issue.

You can test to see if the URLs of the images are working. Instead of just checking it through an img tag, navigate to the URL directly and see if you get some kind of an error, this might help you troubleshoot the issue.



来源:https://stackoverflow.com/questions/9751598/how-to-show-an-uploaded-image-on-jsp-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!