aspose file tools*
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
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: 41879
    
  63
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: 41879
    
  63
Is the HTML page that displays this image in the "Application" directory? If not, then the path is wrong.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: image not getting to display