Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can't find CSS resource file

843844Mar 8 2010 — edited Mar 11 2010
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?????
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 8 2010
Added on Mar 8 2010
7 comments
2,748 views