• 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

image not getting to display

 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

This is Ramesh. I am implementing sprig Application. In jsp file I am trying to display one logo image. I have put that image in WEB-INF folder.

I write image tag in jsp as



but I am not getting to display that image.
have I do any binding in Application-context.xml for displying that image.

can any one please give me suggestion for display that image in jsp page.


Thanks & Regards
Ramesh K
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing that's inside of WEB-INF will be served to the client. You need to move the image into a publicly accessible directory, along with all the other HTML, CSS and JS files.

Also note that if you prepend the image path with a slash, then the server will look in the root directory, which generally isn't going to work if you want to use the concept of Java web apps.
 
ramesh kancherla
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have placed image filses in

Application->images->logo.gif

I have given a image path as <img src="images/logo.gif">

still I am not getting to display image.
can you please give me suggestion

Thanks & Regards
Ramesh K
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the HTML page that displays this image in the "Application" directory? If not, then the path is wrong.
 
His brain is the size of a cherry pit! About the size of this 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