I am having trouble getting my CSS sheet to load while using JSF2 and PrimeFaces.
The CSS file is located at WebContent/resources/css/style.css
Here is the xhtml code:
<h:head></h:head>
<h:body>
<h:outputStylesheet name="css/styles.css" />
I have tried placing h:outputStylesheet within h:head and also used the library="css" tag, but it did not work.
The resulting HTML looks like this:
<head>
<link type="text/css" rel="stylesheet" href="/WireTapLogSearchUtility/faces/javax.faces.resource/theme.css?ln=primefaces-home" />
<link rel="stylesheet" media="screen" type="text/css" href="/WireTapLogSearchUtility/faces/javax.faces.resource/primefaces.css?ln=primefaces&v=3.2" />
<script type="text/javascript" src="/WireTapLogSearchUtility/faces/javax.faces.resource/jquery/jquery.js?ln=primefaces&v=3.2"><!--//-->
</script><script type="text/javascript" src="/WireTapLogSearchUtility/faces/javax.faces.resource/primefaces.js?ln=primefaces&v=3.2"><!--//-->
</script><script type="text/javascript" src="/WireTapLogSearchUtility/faces/javax.faces.resource/jsf.js?ln=javax.faces"><!--//--></script>
</head>
When searching for style.css in the source with ctrl+f, there are no results found.
Furthermore, I have added the mapping in web.xml:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>