Trying to include stylesheet in JSF2 using below tag
<h:outputStylesheet name="css/test.css" />
However it's not picking and the directory structure of the stylesheet as follows
WebContent-->css-->test.css
Can anyone please help me to resolve the issue?
The <h:outputStylesheet> (and <h:outputScript> and <h:graphicImage>) refers JSF resources from the special /resources subfolder. Just create that subfolder and put your css/test.css in there.
WebContent
|-- resources
| `-- css
| `-- test.css
:
Then you can keep using
<h:outputStylesheet name="css/test.css" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With