hi,
try the following
- check the case of the file name, example myimage.jpg instead of
MyImage.jpg
- try giving /webapp/images/MyImage.jpg
- check if you can directly access the image by giving /webapp/images in the
browser and then see if the file is in the file list

Regards,
Nagarajan.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of James
Adams
Sent: Friday, September 07, 2001 12:49 AM
To: [EMAIL PROTECTED]
Subject: Image file not found - why not ?


I have a JSP which tries to load an image which is
referenced by a URI which is set in the request by a servlet.

<img src="<%= request.getAttribute("imageURL") %>"
     alt="IMAGE NOT FOUND">

Unfortunately this has never worked because Tomcat can never
find the image.  Perhaps I am using a bad URI ?  I have the
image located under my application's base directory in a
subdirectory
named "images".  The URIs I've tried are "images/MyImage.jpg",
"./images/MyImage.jpg" and
"/images/MyImage.jpg", all of which are not found when I
view the page.

Can anyone please tell me what I'm doing wrong ?  Thanks in
advance for all suggestions, and email of the responses would be
appreciated if possible ([EMAIL PROTECTED]).


-James

Reply via email to