title: RES_NOT_FOUND in JSF
body: <p>Iv read a lot of posts but no success in fixing this. A help please....</p>
  
  <p>Eclipse Juno / JSF </p>
  
  <p>Project Structure :
  <img src="https://i.stack.imgur.com/TpOLW.png" alt="enter image description here"></p>
  
  <p>teste.xhtml :</p>
  
  <pre><code>&lt;!DOCTYPE html[
      &lt;!ENTITY nbsp "&amp;#160;"&gt; 
      &lt;!ENTITY copy "&amp;#169;"&gt;
  ] &gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"&gt;
  &lt;h:head&gt;
    &lt;h:outputScript library="js" name="slides.min.jquery.js"/&gt;
    &lt;h:graphicImage value="images/blog.png" /&gt;
    &lt;h:outputStylesheet name="css/estilo.css"/&gt;
    &lt;/h:head&gt;
    &lt;h:body&gt;
    #{javax.faces.resource}
    &lt;/h:body&gt;
    &lt;/html&gt;
  </code></pre>
  
  <p>The output is :</p>
  
  <pre><code>&lt;link type="text/css" rel="stylesheet" href="RES_NOT_FOUND"&gt;
  </code></pre>
  
  <p>The same res_not_found  to js and image</p>
  
  <p>pom.xml  :</p>
  
  
  
  <pre><code>&lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
          &lt;version&gt;6.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.primefaces&lt;/groupId&gt;
      &lt;artifactId&gt;primefaces&lt;/artifactId&gt;
      &lt;version&gt;4.0&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;org.primefaces.extensions&lt;/groupId&gt;
      &lt;artifactId&gt;all-themes&lt;/artifactId&gt;
      &lt;version&gt;1.0.8&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;com.sun.facelets&lt;/groupId&gt;
      &lt;artifactId&gt;jsf-facelets&lt;/artifactId&gt;
      &lt;version&gt;1.1.14&lt;/version&gt;
  &lt;/dependency&gt;
  
  
  &lt;dependency&gt;
      &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
      &lt;artifactId&gt;jsf-impl&lt;/artifactId&gt;
      &lt;version&gt;2.1.23&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;com.sun.faces&lt;/groupId&gt;
      &lt;artifactId&gt;jsf-api&lt;/artifactId&gt;
      &lt;version&gt;2.1.23&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;       
  
  &lt;dependency&gt;
      &lt;groupId&gt;javax.faces&lt;/groupId&gt;
      &lt;artifactId&gt;javax.faces-api&lt;/artifactId&gt;
      &lt;version&gt;2.2&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
      &lt;version&gt;3.0-alpha-1&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;rome&lt;/groupId&gt;
      &lt;artifactId&gt;rome&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.apache.pdfbox&lt;/groupId&gt;
    &lt;artifactId&gt;pdfbox&lt;/artifactId&gt;
    &lt;version&gt;1.8.3&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;!-- REPOSITORIOS MAVEN --&gt;
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;prime-repo&lt;/id&gt;
          &lt;name&gt;PrimeFaces Maven Repository&lt;/name&gt;
          &lt;url&gt;http://repository.primefaces.org&lt;/url&gt;
          &lt;layout&gt;default&lt;/layout&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;jboss-repo&lt;/id&gt;
          &lt;name&gt;Jboss Maven Repository&lt;/name&gt;
          &lt;url&gt;http://repository.jboss.org&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;!-- -CONFIGURANDO PLUGIN PARA GERACAO DOCUMENTAÇÃO --&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3&lt;/version&gt;
              &lt;configuration&gt;
                      &lt;outputDirectory&gt;/srv/jboss-as-7.1.0.Final/standalone/deployments&lt;/outputDirectory&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;locales&gt;pt-BR&lt;/locales&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-deploy-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.7&lt;/version&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.4&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;!-- &lt;descriptorRefs&gt; &lt;descriptorRef&gt; jar-with-dependencies &lt;/descriptorRef&gt; 
                      &lt;/descriptorRefs&gt; --&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.0&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;executable&gt;${JAVA_HOME}/bin/javac&lt;/executable&gt;
                  &lt;compilerVersion&gt;1.6&lt;/compilerVersion&gt;
                  &lt;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;copy-resources&lt;/id&gt;
                      &lt;phase&gt;validate&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;copy-resources&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;outputDirectory&gt;${basedir}/target/abc/resources
                          &lt;/outputDirectory&gt;
                          &lt;resources&gt;
                              &lt;resource&gt;
                                  &lt;directory&gt;src/main/resources&lt;/directory&gt;
                                  &lt;filtering&gt;true&lt;/filtering&gt;
                              &lt;/resource&gt;
                          &lt;/resources&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  
  &lt;/build&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>jboss-web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee
                                  http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd"&gt;
      &lt;!-- URL to access the web module --&gt;
      &lt;context-root&gt;/&lt;/context-root&gt;
  &lt;/jboss-web&gt;
  </code></pre>
  
  <p>web.xml</p>
  
  <pre><code> &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.xhtml&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>Ive tried a lot of settings for h:outputStyleSheet but with no success.....</p>
  
  <p>thanks in advance</p>