avirk avirk - 4 months ago 17
HTML Question

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:\Users\VIRK\Desktop\66.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:\Users\VIRK\Documents\NetBeansProjects\practiceJSP .

<img src="/66.jpg" width="400" height="400" ></img>

Answer

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.

Comments