0

I'm writing a Java web application using JSF and Primefaces. I have to load a cascade style sheet named general.css and then I have the following line in my HTML head section:

<h:outputStylesheet library="css" name="general.css"/>

This tutorial (http://docs.oracle.com/javaee/6/tutorial/doc/girgm.html) says I should put this file under web/resources/css, but when I do that the page is rendered with the following:

<link type="text/css" rel="stylesheet" href="RES_NOT_FOUND" />

Some suggestion about where should I put this file?

The question indicated as a possible duplicate does NOtT answer how to use the library element. Ir certainly indicates how to locate the need files inside the project structure, but I still would like to know how to use the library="css" element without needing to give the directory css/ every time I need to include a cascade style sheet file.

1 Answers1

0

I solved the issue according with a suggestion by @BuddistBeast, removing the library="css" element.

It seems the idea of the library element is not organizing the directory structure under web/resouces, according with What is the JSF resource library for and how should it be used?

Community
  • 1
  • 1