Home  >  Article  >  Web Front-end  >  Why can't the loaded image be displayed on the IE web page for the jsp page I wrote? _html/css_WEB-ITnose

Why can't the loaded image be displayed on the IE web page for the jsp page I wrote? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:21:401338browse

JSP Eclipse picture

I used Eclipse to build a dynamic website. In the jsp file I wrote, a picture was loaded, which can be displayed in the browser that comes with eclipse, but cannot be displayed normally in IE. Why?

Reply to the discussion (solution)

It’s impossible (it works well in IDE, but it can’t be displayed when opened with IE on the server?), how do you write the image path

Write the absolute path directly! Some of my classmates can display it. Is it an IE setting problem?

If you put it in the img folder under the WebContent directory, how should you write the path, aac53516bdb2e35832878eec5d2cce08???

Try it

<img src="${pageContext.request.contextPath}/img/1.jpg" />


img is in the root directory of the project, example: openLab/webContent/img

/ Root directory
../ Parent path
./ Current Path

Statement:
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