Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

problem in loading an image  RSS feed

 
nikitha kakani
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends,
i am retrieving an image from database ,but when it comes to matter of displaying in jsp,i need to refresh it (it might be once,twice to refresh) then the image is displayed .I am unable to understand why image is not loaded when the jsp is called.

here is the code:
<img src="C:\\out.gif" width=75 height=75>

thanks in advance
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This link will only work if the user is sitting at the machine that is hosting your application (or if the user happens to have that image on their local hard drive).

You're going to need to either put the image in a directory that can be seen by your application or write a servlet that reads the image from the server's disk and streams it to the browser.
 
nikitha kakani
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes what you is correct even i am doing the same thing .lets suppose that images is the folder that is being shared i wrote like image/gg.gif .even though until unless i refresh it the image is not visible .can any one send a piece of code .thanks in advance
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first thing to check would be if the image is properly retrieved. Check the web server access logs if the request comes in for the correct file and directory, and results in a 200 response code.

A tool like the Firefox extension LiveHttpHeaders would also be very useful in examining what HTTP requests are being sent by the browser, and what the response is.
[ February 06, 2008: Message edited by: Ulf Dittmer ]
 
nikitha kakani
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the reply.Its working perfect in mozillafirefox,but in IE6 there is a problem ,i need to refresh twice.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!