4

Within <h:head/> tags I have:

<h:outputStylesheet name="css/common.css" />

This is output as:

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

The stylesheet is within a folder named css under the webapp folder of my maven war. When I browse to http://localhost:8080/mywar/css/common.css I see the stylesheet.

Any ideas what I'm missing? Thanks in advance.

1

1 Answer 1

9

I followed the directory structure and layout from tip 4 here: http://www.ibm.com/developerworks/java/library/j-jsf2fu1/index.html

Essentially moved the css folder to be under one called resources and then referenced it as:

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

Now it seems to work!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.