Wildfly 10 issue with css file

后端 未结 1 431
野性不改
野性不改 2021-01-19 04:42

Above code is not working in wildfly 10 with jar file jsf-

相关标签:
1条回答
  • 2021-01-19 05:11

    The value of a library attribute should not be a path but a reference to a single folder (grouping css ,js etc.) and a direct descendant of the resources folder.

    So changing

    <h:outputStylesheet library="test/css"  name="style.css" />
    

    to

    <h:outputStylesheet library="test"  name="css/style.css" />
    

    should make it work.

    Mojarra has been too liberal in this and it seems they are 'improving' things. I ran into a similar difference with the location of composite components. MyFaces did not allow paths in there as well, while Mojarra (until at least 2.2.12) still does.

    For more details on best usage, see

    • What is the JSF resource library for and how should it be used?
    0 讨论(0)
提交回复
热议问题