6 Replies Latest reply on Sep 17, 2014 1:14 PM by M S

    Upgrading from JSF 2.1.29 to 2.2.8 causes JavaScript and CSS files to not load

    M S Newbie

      My web application, running on Tomcat 7, is using JSF 2.1.29 and RF 4.5.0.Beta2 and runs fine.  If I switch my JSF dependency in my Maven project to 2.2.8 (the latest JSF version), then I start seeing serious issues with my application when it runs.  Specifically, whenever the page tries to render CSS or JavaScript links in the header, I see things like the following:

      <script src="/mywebapp/org.richfaces.resources/javax.faces.resource/RESOURCE_NOT_FOUND" type="text/javascript"></script>

      <link href="/mywebapp/org.richfaces.resources/javax.faces.resource/RESOURCE_NOT_FOUND" rel="stylesheet" type="text/css">

       

      I do not see any exceptions in any of the Tomcat logs.

       

      My web.xml:

      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns="http://java.sun.com/xml/ns/javaee"

         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"

               version="3.0">

      ...

      <servlet>

        <servlet-name>Faces Servlet</servlet-name>

        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

        <load-on-startup>1</load-on-startup>

      </servlet>

      <servlet-mapping>

        <servlet-name>Faces Servlet</servlet-name>

        <url-pattern>*.jsf</url-pattern>

      mapping>

      <servlet>
         <servlet-name>Resource Servlet</servlet-name>
         <servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>
         <load-on-startup>1</load-on-startup>
      </servlet>

      <servlet-mapping>
         <servlet-name>Resource Servlet</servlet-name>
         <url-pattern>/org.richfaces.resources/*</url-pattern>
      </servlet-mapping>

       

      I don't know if the resources servlet is still required -- none of the documentation references it.  Commenting it out does not do anything.

       

      I am still debugging this, but additional hints as to where to look would be appreciated.

       

      Edit: OK, so what I think I have found is that RF4.x does not support JSF 2.2, so I might be trying something really dumb.  There is no conclusive documentation on this matter, however.