0

I got this in my css file:

background: #1484e6 url("/webapp/javax.faces.resource/images/ui-bg_diagonals-thick_22_1484e6_40x40.png.xhtml?ln=primefaces-excite-bike") 50% 50% repeat;

How would I reference to the image instead of using this full url? Because the basename "webapp" could change, so this will not always work.

I tried using this, but it won't work:

#{resource['images:ui-bg_diagonals-thick_22_1484e6_40x40.png']}

1 Answer 1

2

You used the wrong library name. The part before : in the resource identifier represents the library name. You specified images, while it should be primefaces-excite-bike as indicated by the ln request parameter in the URL.

So, this should do:

#{resource['primefaces-excite-bike:images/ui-bg_diagonals-thick_22_1484e6_40x40.png']}

See also:

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for also referring me to related information!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.