webtier@glassfish.java.net

Re: [webtier] <h:outputStylesheet> rendering after primefaces resources.

From: <webtier_at_javadesktop.org>
Date: Thu, 11 Mar 2010 07:38:44 PST

I am using Windows XP with Netbeans 6.9 M1.

I am using JSF 2.0 and maven 2.2 and Glassfish V3.

In my index.xhtml, I am using: <h:outputStylesheet name="resources/css/styles.css" />
although I have tried library="css" and name="styles.css"

When I created a stylesheet, I put it in the following
directory:
c:\MyWebApps\MyProj\src\main\resources\css\styles.css

After doing a build, it was in the following directories:
c:\MyWebApps\MyProj\target\classes\css\styles.css
c:\MyWebApps\MyProj\target\MyProj\WEB-INF\classes\css\styles.css

In MyProj.war (using WinZip)
\WEB-INF\classes\css\styles.css

I used the Admin Console to deploy and launch.

When I launched MyProj, the web page was displayed but
there was no CSS styling.
When I view page source, I see:
<link type="text/css" rel="stylesheet" href="RES_NOT_FOUND" />

I found the following in the server log
INFO: MyProj was successfully deployed in 5,266 milliseconds.
WARNING: JSF1064: Unable to find or serve resource, styles.css, from library, /WEB-INF/classes/css.
WARNING: JSF1064: Unable to find or serve resource, resources/css/styles.css.
WARNING: JSF1064: Unable to find or serve resource, css/styles.css.

What am I missing?????
[Message sent by forum member 'mlbrooks' (mykelbrooks_at_sbcglobal.net)]

http://forums.java.net/jive/thread.jspa?messageID=391280