I'm using PrimeFaces version 5.2 and Glassfish as server to deploy my results. I've coded a short example in order to download a file from the server and I'm getting problems showing the GIF image related to a progress bar.
The problem itself is that I can't find the correct path to the image. My folder structure looks like this image:
I'm going to give you more details in the next images you can see below:
This image shows you the xhtml fragment related to the path, in this case:
"images/ajaxloadingbar.gif"
You can see the GIF is not properly displayed, and the other code appended is the html generated and presented by Inspect element
option of Chrome Web browser.
I noticed that I achieve my goal removing javax.faces.resource
and the last xhtml
extension (See 3rd image).
Knowing this behavior I tried some variants in the image path and I'm still struggling with this issue. The following are some of those paths I tried without luck.
Unable to find or serve resource, images/ajaxloadingbar.gif.
Unable to find or serve resource, /images/ajaxloadingbar.gif.
Unable to find or serve resource, ../../images/ajaxloadingbar.gif.
Unable to find or serve resource, ../images/ajaxloadingbar.gif.
Unable to find or serve resource, Pack_Encrypt/images/ajaxloadingbar.gif.
Unable to find or serve resource, /Pack_Encrypt/images/ajaxloadingbar.gif.
Unable to find or serve resource, /WebContent/images/ajaxloadingbar.gif.
I really appreciate any help or idea regarding this tricky path. I would like to use a relative path rather than an absolute path.
Kind regards, Luis A.
I didn't try with **Facelets Templates** because those terms are completely new to me. Please don't downvote my question because of this. This question can help people unfamiliar with the terms used above. – Luis Armando Aug 06 '15 at 15:38