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 works perfectly, but when I give a run on the project the image does not load, it only loads after some operation is performed.
Anyone can help?
Is this Resources folder I should create? or is it SRC?
– DiegoAugusto
And when I put that inside a
style
of error– DiegoAugusto
I created a css class and put this code. but if it’s inside a
style
, try using thisstyle="background-image: url('#{resource['images/textura.jpg']}')"
. I created the folder manually.– Rafael
I created the Resource folder in Webcontent, and put the code, the image does not appear
– DiegoAugusto
problem solved, I made a modification and it worked:
background-image:url(#{request.contextPath}/resources/images/textura.jpg);
– DiegoAugusto