jsf 2 - JSF doesn't read external css file -
i have external css file in resources folder under webcontent folder, , included @ page header follows:
<h:head> <h:outputstylesheet name="css/style.css" library="css" /> </h:head> i tried simple selector test if file working body {background-color:#b0c4de;} unfortunately file isn't linked
for more clarity included here screenshot exact location of resources folder

first of all, not external css file @ all. it's internal web application. real external css file served different domain , not importable via <h:outputstylesheet>, via <link>.
your concrete problem caused because unnecessarily repeated css file folder library attribute. rid of it.
<h:outputstylesheet name="css/style.css" /> the library attribute must represent common module/theme/library name, such "primefaces", don't have here. using library name of "css" makes no utter sense "css" represents file/content type.
Comments
Post a Comment