File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Image not displaying Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Image not displaying" Watch "Image not displaying" New topic
Author

Image not displaying

kranthi devarapalem
Greenhorn

Joined: Sep 10, 2012
Posts: 14
Hi all

in one of my jsp i tried to display a image but it is not displaying the image. i have tried to the same code on html it worked. below is the jsp code and i am using Tomcat. below is the code

<tr align="center" height="80%">
<td align="center">
<img src='E:\Kranthi\eclipse\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\App\newsimages\JrNtr.jpg' alt="image" >
</td>
</tr>


thanks in Advance for the help.

Regards
Kranthi.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

You are using a file path for the image rather than a URL. That won;t work on any system but your own.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
kranthi devarapalem
Greenhorn

Joined: Sep 10, 2012
Posts: 14
Thanks for the response. But its not working in my system also
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61768
    
  67

Well, as it's the wrong approach in the first place, ditch it and use the URL to the image.

The image URL should be the server-relative path to the image beginning with the context path of the web app. See the JspFaq for details.
kranthi devarapalem
Greenhorn

Joined: Sep 10, 2012
Posts: 14
Thanks A Lot it worked. Actually i was getting the path from a column and i am using that in src as that is absolute path it did not work i think.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Image not displaying