webtier@glassfish.java.net

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

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Thu, 11 Mar 2010 08:45:01 -0800

On 3/11/10 7:38 AM, webtier_at_javadesktop.org wrote:
> 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
>
Your resources need to be in stored within the resources directory (off
the docroot),
not in WEB-INF/classes.
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>
>