• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Display image using img src tag in ubuntu

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic