This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display image using img src tag in ubuntu

 
Narendra Yadava
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends

<img src="/home/erp/iimage1.png" />

I am unable to display above image in the jsp.I have provided 777 permission to this image but image is not displaying. I am using ubuntu OS.But in windows when we provide hard path like <img src="c:/erp/iimage1.png" />then it is working fine.


Please Any can help me about it

Thanks in Advance

Narendra Yadava
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15203
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The value of the src attribute is really an URL, not just a path name. You could try specifying a file URL:

<img src="file:///home/erp/iimage1.png" />

But really, what you're trying to do is a bit strange, some people would even call it wrong. You're making the browser look for an image file on the local harddisk. If you browse to the webpage from an arbitrary other client computer, the browser will try to find the image on the local harddisk of that client computer, not on the server. Why would you want to do that?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic