I've created sample for JSF template. I did new file... Faceletes Template and CSS file is created by NetBeans itself. However when I try run my project there is normal text
Top
Content
and that's it. Semms like isn't connected with CSS...?
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<h:outputStylesheet name="default.css" library="css"/>
<h:outputStylesheet name="cssLayout.css" library="css"/>
<title>Facelets Template</title>
</h:head>
What is interesting when I do change in web.xml file:
<welcome-file-list>
<welcome-file>faces/template.xhtml</welcome-file>
</welcome-file-list>
And welcome file is template.xhtml instead of index.html it works well but client page when I would use my template still is doesn't read css
<ui:composition template="./template.xhtml">
I really have read much info but I can't find solution. I have done everything form How to reference CSS / JS / image resource in Facelets template? and my project still does not work.
My env: NetBeans IDE 8.0.2
Java EE 7
GlassFish 4.1
JSF 2.2