JSF h: outputStylesheet doesn't display anything

it

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">

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

doing nothing. Should I add some kind of configuration? test.cssavailable in my resources folder.

+3
source share
2 answers

JSF inserts style sheets into the header or body elements of HTML (head is the default, IIRC). In order for the JSF to find the head or body, you must declare them as <h:head></h:head>and <h:body></h:body>(not easy <head></head>, etc.).

+6
source

JSF , , <h:outputScript> , <h:head> <h:body>. <h:outputStylesheet> , <h:head> .

+2

Source: https://habr.com/ru/post/1770691/


All Articles