img src problem

Category: Web Develop
 
timing_wsl
2008-11-12 10:24:37

Sponsored Links
Relative path image can not be displayed in the browser, you can display the absolute path, <img src="image\2.jpg">, preview images in myeclipse there, but IE is the red cross on, and changed into, <img src="image/2.jpg"> or, <img src="../image/2.jpg"> or, <img src = "./image/2.jpg"> are the same, do not understand, seek guidance, and the other, the difference between the forward slash and backslash are not?

Sponsored Links

imhauy
2008-11-12 10:28:16
you this picture is the new added it? If it is what you may need to refresh the folder, and then restart tomcat try.
lichk12
2008-11-12 10:32:14
5 floor should be able to try
majehello
2008-11-12 10:51:15
above in my web server path to find the right property look at it to understand ; Oh
nicai_1
2008-11-12 11:07:51
Your picture on which folder, if it is under WEB-INF, there will be such a problem, another place to store, in addition to being the difference between the backslash is a next one in the windows system LINIX system
guyxyz
2008-11-12 11:25:29
img and image under all
cnzdl715
2008-11-12 11:39:48
general system will automatically find webRoot directory,

So if there heads webRoot img directory, img directory which has a xx.jpg, it can be accessed

<img src = "/ img / xx.jpg" ;> Note circuit path first slash

do experiments, Oh
fjyadht
2008-11-12 11:57:30
Landlord, if it is in MyJsp.jsp bottom of the page, then it should be <img src="image/2.jpg">, in fact, sometimes your IE cache problem, your attention facie Well, a picture, myeclipse definitely give you face, show up. Oh
zhuxiao3
2008-11-12 12:06:08
LZ can actually crossed right-click on the photos to view photo of the path, look at how the find, and then do more experiments, we can explore the experience!
qqxiake_3
2008-11-12 12:12:52
project name in front of it plus / FirstJSP / image / xx.jpg
Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.