Home > Web Front-end > HTML Tutorial > java jsp upload pictures and display them in the front desk_html/css_WEB-ITnose

java jsp upload pictures and display them in the front desk_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:51:46
Original
1486 people have browsed it

First upload the image to the server, and then want to display the image on the page through the img tag, but it just cannot be displayed. It is displayed in various paths. Only the absolute path is displayed, but it cannot be displayed.


Reply to the discussion (solution)

Visit the url of the image individually to see if it can be displayed.

Check the path, the path is wrong

I checked many times and found a problem. It can be displayed when I did it before. It is because the relative configuration is configured in tomcat's server.xml file. Path: , but this development does not Configuration: In theory, it should be done without configuring a relative path It can also be viewed, but the problem is, where is it?


Check the path. The path is wrong

?

Visit the URL of the image individually to see if it can be displayed.

?


Visit the URL of the image individually to see if it can be displayed.

Right click on the image properties and copy the url to the address bar to see

Can you see the image



?


Visit the URL of the image individually to see if it can be displayed.

Right-click the image properties and copy the url to the address bar to see

Problem solved: There is no access permission for the upload folder, just give it permission.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template