Reputation: 137
I'm using the JSF 2.2. I can't add .css
in my .xhtml
page.
Code in .xhtml
<h:head>
<title>Login Page</title>
</h:head>
<h:body>
<h:outputStylesheet library="resources/css" name="style.css" id="cascade1"/>
Also I tried declare it into a <h:head>
with the same result.
FireBug is seeing this resource but it is showing message:
Reload the page to get source for .../javax.faces.resource/style.css.xhtml;...
Upvotes: 0
Views: 4503
Reputation: 18472
There is no need to use the library
attribute:
<h:outputStylesheet name="css/style.css" />
This way, the JSF servlet expects the style.css
file to be in /resources/css
path.
Upvotes: 3