I am developing a web application using netbeans,in that i need to display an image. If i place the image in /web folder it is displaying the image but while placing the image like this C:/1.jpg not displaying …..
But i put the image at C:/ and even i tested this url in web browser and in file manager. It is displaying the corresponding image while using in the application it is not showing..!!
What is the problem??
this is my code
%><tr><td></td><td id="C:/1.jpg" class="options" style="cursor:pointer"><%=salespersons[sub]%></td></tr><%
and corresponding jquery is,
$("td.options").hover(function(){
var imgsrc= $(this).attr('id');
$("#photo").attr('src',imgsrc);
});
and
</center><div id="imagediv"><img src="" id="photo" alt="No Image Found" width="100" height="100"/></div><center>
if you have any file outside the project folder, it will not be loaded by server when you deploy the project so its not accessed. If you want these files to be loaded you should include the complete path in the server configuration file to load these files explicitly by server while starting the server.