Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
362 views
in Technique[技术] by (71.8m points)

html - Image is not showing in browser?

<body style="background-color: paleturquoise">
    <h2 style="color: red">Duke's soccer League: Home Page<br/></h2>
    <ul style="list-style-type: circle">
        <li style="font-size: larger"><a href="league_list.in">All Leagues list</a></li>
        <li style="font-size: larger">Register for a League (TBA)<br/><br/></li>
    </ul>
    <h2 style="color: red">League Administrator</h2>
    <ul style="list-style-type: square">
        <li style="font-size: larger"><a href="add_league.in">Add a new League (TBA)</a></li>

        <img  src="C:UsersVIRKDesktop66.jpg" width="400" height="400" ></img>

</ul>
</body>  

I am currently practice with JSP and I try this html code to make a web page on NetBeans IDE 7.0 but when I'm build and run the page no error in code but the image is not showing in the browser.

Edited:

enter image description here

Here I have given the screenshot of the NetBeans IDE where you can see the image is existing in Web-INF folder and the index.jsp page too and I tried with "/" before the image name but it won't work. The exact path of my project is C:UsersVIRKDocumentsNetBeansProjectspracticeJSP .

<img  src="/66.jpg" width="400" height="400" ></img>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I find out the way how to set the image path just remove the "/" before the destination folder as "images/66.jpg" not "/images/66.jpg" And its working fine for me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...