Background image does not appear when I run the project

1

I have a JSF + Primefaces project and I have a css that puts a background:

<h:body 
    style="background-image: url('../images/textura.jpg');">

When I run the page it works perfectly, but when I give a run in the project the image does not load, it only loads after some operation is performed.

Can anyone help?

    
asked by anonymous 10.06.2015 / 20:11

1 answer

1

Probably the path of the image. I recommend leaving images in the system resources folder. Example: resources/images . So using #{resource[]} it takes the root path to the folder. Example:

 background-image: url("#{resource['images/textura.jpg']}");
    
10.06.2015 / 22:17