• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic