2

I have a JSF project with vendor libraries inside the Resource folder.

When I do this,

<h:outputStylesheet name="vendor/bootstrap/dist/css/bootstrap.min.css" />

.. it outpus

<link type="text/css" rel="stylesheet" href="/InternalWeb_war_exploded/javax.faces.resource/vendor/bootstrap/dist/css/bootstrap.min.css.xhtml" />

... which works. But stuff referenced in the CSS such as web fonts does not load because it doesn't have the .xhtml suffix automatically added to it.

How should I best deal with this?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
mushroom
  • 1,909
  • 3
  • 16
  • 33
  • Maybe it's already answered for you here: http://stackoverflow.com/questions/9700341/jsf2-add-custom-font-to-css-stylesheet – Wesley Egbertsen Sep 10 '15 at 07:50
  • @WesleyEgbertsen I already saw that answer previously. In his case, he was using his own stylesheet and could do that. In mine, I'm using a library and you don't just modify code in libraries to get it working! – mushroom Sep 10 '15 at 07:53
  • Is this acceptable as dupe? http://stackoverflow.com/questions/18891768/how-to-use-font-awesome-3-2-1-from-webjars-org-with-jsf/ – BalusC Sep 10 '15 at 08:00
  • @BalusC No, because the question is slightly different and the answer in that question involved modifying the CSS file directly. – mushroom Sep 10 '15 at 08:06
  • 1
    So you didn't read the answer from top to bottom? – BalusC Sep 10 '15 at 08:07

0 Answers0