*
The moose likes Other Application Frameworks and the fly likes image not getting to display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
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: 124
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: 41182
    
  45
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.


Ping & DNS - my free Android networking tools app
ramesh kancherla
Ranch Hand

Joined: May 01, 2008
Posts: 124
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: 41182
    
  45
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://aspose.com/file-tools
 
subject: image not getting to display
 
Similar Threads
how do I know Edit Database Record
how to retrieve image in jsp page from a seperate folder.
How to upload a Image using JAVA program
Display an image on JSP from byte[]
Look and feel