This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes image not getting to display Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply Bookmark "image not getting to display" Watch "image not getting to display" New topic
Author

image not getting to display

ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 120
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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35247
    
    7
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.


Android appsImageJ pluginsJava web charts
ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 120
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
Marshal

Joined: Mar 22, 2005
Posts: 35247
    
    7
Is the HTML page that displays this image in the "Application" directory? If not, then the path is wrong.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: image not getting to display
 
Similar Threads
Look and feel
how to retrieve image in jsp page from a seperate folder.
Display an image on JSP from byte[]
how do I know Edit Database Record
How to upload a Image using JAVA program