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
  • 15

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,853
  • 3
  • 55
  • 72
  • This is actually wrong usage of `library`. OP should have used ``. See also http://stackoverflow.com/questions/11988415/what-is-the-jsf-resource-library-for-and-how-should-it-be-used – BalusC Feb 22 '13 at 11:17