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

enter image description here

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.

see also:


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -