0

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;...

burnmyheaven
  • 137
  • 2
  • 13

1 Answers1

3

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.

Mohammad Dehghan
  • 17,154
  • 3
  • 54
  • 67