voyent
Problem displaying image  XML
Forum Index -> General Help
Author Message
seanthomas

Joined: 03/Mar/2010 00:00:00
Messages: 5
Offline


I am using ICEfaces 2 in Eclipse Helios.

I have a component configured as follows:

<ice:graphicImage
id="logo"
value="src/images/BBBSLogo.jpg"
alt="Could not load image."/>

The value string was obtained by going to the Properties for the image and copying the path.

However the image does not display. I have tried all the options I can think of (at present...).

All tips appreciated.

Kind regards

Sean
edykory


Joined: 27/Nov/2006 00:00:00
Messages: 332
Offline


most probably the path in "value" is not correct. I don't know the project structure you are using, but after generating the war, check the path to the image in the war, not in your source project. And use that path.

if you have proejct.war
/images
/css
/WEB-INF


then you need value="/images/BBBSLogo.png", even if in your project source you have that src folder. But, if the project is a classic eclipse project, then you are putting the images in the wrong place. They should be in /WebContent/images, not /src/images (Check if the images end up in the generated war in /WEB-INF/classes/images -> then you found your mistake and move the images folder to the WebContent folder of you eclipse project).

Cheers,
Eduard Korenschi
seanthomas

Joined: 03/Mar/2010 00:00:00
Messages: 5
Offline


Hi Eduard
Thanks a heap. Problem solved and I learned plenty.
Help very much appreciated.
Kind regards
Sean
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team