Link to CSS file in JSF?
In the <h:head/>
tags, I have:
<h:outputStylesheet name="css/common.css" />
This is output as:
<link type="text/css" rel="stylesheet" href="RES_NOT_FOUND" />
The stylesheet is in the css folder under the webapp folder of my maven war. When I go to http: // localhost: 8080 / mywar / css / common.css , I see a stylesheet.
Any ideas what I am missing? Thanks in advance.
I followed the directory structure and layout from tooltip 4 here: http://www.ibm.com/developerworks/java/library/j-jsf2fu1/index.html
Essentially, the moved css folder will be under one of the named resources and then refer to it as:
<h:outputStylesheet library="css" name="common.css" />
Now it works!