1 Reply Latest reply on Jan 6, 2013 9:18 PM by Brett Williamson

    RichFaces 4 css is not loading

    Brett Williamson Newbie

      Hello,

      I am currently upgrading from RichFaces 3.3.3 to RichFaces 4 and have run into the following problem:

       

      Having set the skin to blueSky is appears as if the required CSS is NOT loading.  No styleing is being applied to components and I can see in browser debug that component styles are NOT present. I can see some resources requests in the network traffic:

       

      ScreenHunter_11 Jan. 04 12.29.jpg

       

       

      I have tried difference combinations of the following context parameters:

       

       

      org.richfaces.resourceOptimization.enabled And

      javax.faces.PROJECT_STAGE

       

      There is no load style source rendered in the page source other than my own CSS requests, ie. no component specific requests for styles.

       

      See below my web.xml, maybe I have missed something in the conversion process, or though I have followed migration guide closely:

       

       

       

       

      Thansk for any feedback.

       

       

      <?xml version = '1.0' encoding = 'windows-1252'?>
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd" version="2.5">
          <display-name>x</display-name>
          <description>x.</description>
          
          <welcome-file-list>
              <welcome-file>index.xhtml</welcome-file>
          </welcome-file-list>
          <!--#############################-->
          <!-- CONTEXT PARAMETERS SECTIONS -->
          <!--#############################-->
          
          <!-- Performance enhancements -->
          <context-param>
              <param-name>org.richfaces.resourceOptimization.enabled</param-name>
              <param-value>false</param-value>
          </context-param>
          
          <context-param>
              <param-name>javax.faces.PROJECT_STAGE</param-name>
              <param-value>Development</param-value>
          </context-param>
          
          
          <context-param>
              <param-name>testMode</param-name>
              <param-value>true</param-value>
          </context-param>
          <context-param>
              <param-name>rtuTimeIsGMT</param-name>
              <param-value>true</param-value>
          </context-param>
          
          <context-param>
              <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
              <param-value>NONE,NEKO,TIDY</param-value>
          </context-param>
          <context-param>
              <param-name>org.ajax4jsf.xmlparser.NONE</param-name>
              <param-value>/pages/performance\.xhtml,/pages/default.*\.xhtml</param-value>
          </context-param>
          <context-param>
              <param-name>org.ajax4jsf.xmlparser.NEKO</param-name>
              <param-value>/pages/repeat\.xhtml</param-value>
          </context-param>  
          
          <!-- Plugging the "Blue Sky" skin into the project -->
          <context-param>
              <param-name>org.richfaces.skin</param-name>
              <param-value>blueSky</param-value>
          </context-param>
          <!-- Making the RichFaces skin spread to standard HTML controls -->
          <!--  <context-param>
              <param-name>org.richfaces.enableControlSkinning</param-name>
              <param-value>true</param-value>
          </context-param>-->
          
          <context-param>
              <param-name>facelets.REFRESH_PERIOD</param-name>
              <param-value>2</param-value>
          </context-param>
          <context-param>
              <param-name>facelets.SKIP_COMMENTS</param-name>
              <param-value>true</param-value>
          </context-param>
           <context-param>
              <param-name>facelets.BUFFER_SIZE</param-name>
              <param-value>8192</param-value>
          </context-param>
          
          
          <!-- ###################################### -->
          <!-- ERROR HANDLING PARAMETERS AND MAPPINGS -->
          <context-param>
              <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
              <param-value>false</param-value>
          </context-param>
          
          <context-param>
              <param-name>facelets.DEVELOPMENT</param-name>
              <param-value>false</param-value>
          </context-param>
          
          <error-page>
              <exception-type>java.lang.Throwable</exception-type>
              <location>/farmconnect/errorPage.jsp</location>
          </error-page>
          
          <error-page>
              <exception-type>javax.faces.application.ViewExpiredException</exception-type>
              <location>/index.xhtml?Your%20Session%20Timed%20out</location>
          </error-page>    
          
          <servlet-mapping>
              <servlet-name>jsp</servlet-name>
               <url-pattern>*.jsp</url-pattern>
          </servlet-mapping>
          <servlet>
              <servlet-name>jsp</servlet-name>
              <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
              <init-param>
              <param-name>fork</param-name>
              <param-value>false</param-value>
              </init-param>
              <init-param>
                  <param-name>xpoweredBy</param-name>
                  <param-value>false</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
          </servlet>
          <!-- END ERROR HANDLING PARAMETERS AND MAPPINGS -->
           <!-- ###################################### -->
          
          
          
          <context-param>
              <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
              <param-value>server</param-value>
          </context-param>
          <context-param>
              <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
              <param-value>.xhtml</param-value>
          </context-param>
          <!-- Facelets taglibrary location -->
          <context-param>
              <param-name>facelets.LIBRARIES</param-name>
              <param-value>/farmconnect/conf/facelets/tags/farmconnectTaglib.xml;</param-value>
          </context-param>
          
          <context-param>
              <param-name>applicationName</param-name>
              <param-value>x</param-value>
          </context-param>
          <context-param>
              <param-name>farmconnectImagesDir</param-name>
              <param-value>/farmconnect/images</param-value>
          </context-param>
          <context-param>
              <param-name>imagesDir</param-name>
              <param-value>/farmconnect/images/admin</param-value>
          </context-param>
          <context-param>
              <param-name>farmconnectMappingCentre</param-name>
              <param-value>-36.42615142036109, 145.70772171020508</param-value>
          </context-param>
          <context-param>
              <param-name>farmconnectMappingZoomLevel</param-name>
              <param-value>16</param-value>
          </context-param>
          <context-param>
              <param-name>farmconnectMappingAPIUrl</param-name>
              <param-value>http://maps.google.com/maps</param-value>
          </context-param>  
          <context-param>
              <param-name>farmconnectDefaultPageWidth</param-name>
              <param-value>840px</param-value>
          </context-param>
          <context-param>
              <param-name>farmconnectDefaultTabWidth</param-name>
              <param-value>780px</param-value>
          </context-param>  
          
          <!--  Comms Monitor settings -->
          <context-param>
              <param-name>commsServer</param-name>
              <param-value>x</param-value>
          </context-param>
          
          <context-param>
              <param-name>commsPort</param-name>
              <param-value>x</param-value>
          </context-param>    
          
          <context-param>
              <param-name>commsSystem</param-name>
              <param-value>fc_ibee_nextg</param-value>
          </context-param> 
          <context-param>
              <param-name>adminContextPath</param-name>
              <param-value>farmconnect/administration/</param-value>
          </context-param>    
           <!-- Database settings -->
            <context-param>
              <param-name>jdbcType</param-name>
              <param-value>ORACLE</param-value>
          </context-param>
          
          <context-param>
              <param-name>jdbcServer</param-name>
              <param-value>x</param-value>
          </context-param>
          
          <context-param>
              <param-name>dbName</param-name>
              <param-value>x</param-value>
          </context-param>
          
          <context-param>
              <param-name>dbUID</param-name>
              <param-value>x</param-value>
          </context-param>
          
          <context-param>
              <param-name>dbPwd</param-name>
              <param-value>x</param-value>
          </context-param>
          
          <context-param>
              <description>Number of simultaneous database connections permitted.</description>
              <param-name>dbConns</param-name>
              <param-value>5</param-value>
          </context-param>
          <context-param>
              <description>Should we perform legacy initialisation?</description>
              <param-name>dbLegacy</param-name>
              <param-value>true</param-value>
          </context-param>
          <context-param>
              <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
              <param-value>x</param-value>
          </context-param>
          
          <context-param>
              <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
              <param-value>en_AU</param-value>
          </context-param>
          
          <context-param>
              <param-name>javax.servlet.jsp.jstl.fmt.locale</param-name>
              <param-value>en_AU</param-value>
          </context-param>    
          <context-param>
              <param-name>logLevel</param-name>
              <param-value>1</param-value>
          </context-param>
         
          <context-param>
              <param-name>userAccessLogFile</param-name>
              <param-value>x</param-value>
          </context-param>
          <context-param>
              <param-name>javax.faces.CONFIG_FILES</param-name>
              <param-value>/farmconnect/conf/faces-config.xml,/farmconnect/conf/faces-config-admin.xml,/farmconnect/conf/faces-beans.xml,/farmconnect/conf/faces-beans-admin.xml,/farmconnect/conf/faces-components.xml</param-value>
          </context-param>
          
          <!-- FarmConnect data mode defines data collection architecture being used: IBEE or AQUASPY -->
          <context-param>
              <param-name>farmConnectDataMode</param-name>
              <param-value>IBEE</param-value>
          </context-param>
          <context-param>
              <param-name>org.apache.myfaces.ENABLE_CLIENT_SIDE_VALIDATION</param-name>
              <param-value>false</param-value>
          </context-param>
          <context-param>
              <param-name>org.richfaces.queue.global.enabled</param-name>
              <param-value>true</param-value>
          </context-param>
          <context-param>
              <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
              <param-value>true</param-value>
          </context-param>
          <context-param>
              <param-name>showMessageDetail</param-name>
              <param-value>true</param-value>
          </context-param>
           <!-- Enable database eventing: connect to db event data source and -->
          <!-- have the RichFaces push components enabled so the interface is updated -->
          <!-- in real time. -->
          <context-param>
              <param-name>enableDatabaseEventing</param-name>
              <param-value>false</param-value>
          </context-param>
          <context-param>
              <param-name>showMessageSummary</param-name>
              <param-value>true</param-value>
          </context-param>
          
          
          <!-- A list of role types that are allowed access to this system.  
              Multiple role types must be separated by commas. -->
          <context-param>
              <param-name>authorisedRoleTypes</param-name>
              <param-value>SYS_ADMIN,FC_ADMINISTRATOR,FC_INSTALLER</param-value>
          </context-param>
          
          <!--#############################-->
          <!-- FILTER DECLARATION SECTION  -->
          <!--#############################-->
        
          <filter>
              <filter-name>Authentication Filter</filter-name>
              <filter-class>rubiconx.farmconnect.authenticator.FarmconnectAuthenticateFilter</filter-class>
              <init-param>
                  <param-name>excludePaths</param-name>
                  <param-value>/farmconnect/docs/;/farmconnect/trend/images.jar;/ProbeTrendDataSource;/ResetPassword;/faces/myFacesExtensionResource/org.apache.myfaces.custom.captcha.CAPTCHARenderer/;/index.xhtml;/help.xhtml;/reset.xhtml;/dealer.xhtml;/images;/farmconnect/css;/farmconnect/images;/farmconnect/scripts/js;/css;/a4j/;/javax.faces.resource/;/javax.faces.resource/;/org.richfaces.resources/</param-value>
              </init-param>
              <init-param>
                  <param-name>excludeExtensions</param-name>
                  <param-value>.js;.js.xhtml;AjaxScript.xhtml;PrototypeScript.xhtml;ImageCacheScript.xhtml</param-value>
              </init-param>
              <init-param>
                  <param-name>authenticateMapping</param-name>
                  <param-value>/Authenticate</param-value>
              </init-param>
              <init-param>
                  <param-name>disableCache</param-name>
                  <param-value>false</param-value>
              </init-param>
          </filter>
          
          <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>
          
          <filter>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
              <init-param>
                  <description>Set the size limit for uploaded files.
                      Format: 10 - 10 bytes
                      10k - 10 KB
                      10m - 10 MB
                      1g - 1 GB
                  </description>
                  <param-name>maxFileSize</param-name>
                  <param-value>2m</param-value>
              </init-param>
          </filter>
         <!-- <filter>
              <filter-name>jsp-redirect-filter</filter-name>
              <filter-class>rubiconx.web.common.jsf.filter.JspRedirectFilter</filter-class>
          </filter>-->
          <!-- Caching filters. -->
          <filter>
              <filter-name>StaticCacheFilter</filter-name>
              <filter-class>rubiconx.web.common.HeaderFilter</filter-class>
              <init-param>
                  <param-name>Cache-Control</param-name>
                  <param-value>public</param-value>
              </init-param>
              <init-param>
                  <param-name>HOURS</param-name>
                  <param-value>Expires;96</param-value>
              </init-param>
          </filter>       
          
          <filter>
              <filter-name>SwfCacheFilter</filter-name>
              <filter-class>rubiconx.web.common.HeaderFilter</filter-class>
              <init-param>
                  <param-name>Cache-Control</param-name>
                  <param-value>private</param-value>
              </init-param>
              <init-param>
                  <param-name>Pragma</param-name>
                  <param-value></param-value>
              </init-param>
              <init-param>
                  <param-name>Expires</param-name>
                  <param-value></param-value>
              </init-param>
          </filter>
          <filter>
              <filter-name>JsCacheFilter</filter-name>
              <filter-class>rubiconx.web.common.HeaderFilter</filter-class>
              <init-param>
                  <param-name>Cache-Control</param-name>
                  <param-value>no-cache</param-value>
              </init-param>
              <init-param>
                  <param-name>Pragma</param-name>
                  <param-value></param-value>
              </init-param>
              <init-param>
                  <param-name>Expires</param-name>
                  <param-value></param-value>
              </init-param>
          </filter>
          <filter>
              <filter-name>JpgCacheFilter</filter-name>
              <filter-class>rubiconx.web.common.HeaderFilter</filter-class>
              <init-param>
                  <param-name>Cache-Control</param-name>
                  <param-value>private</param-value>
              </init-param>
              <init-param>
                  <param-name>Pragma</param-name>
                  <param-value></param-value>
              </init-param>
              <init-param>
                  <param-name>Expires</param-name>
                  <param-value>Wed, 1 Jan 2020 20:00:00 GMT</param-value>
              </init-param>
          </filter>
          <filter>
              <filter-name>GifCacheFilter</filter-name>
              <filter-class>rubiconx.web.common.HeaderFilter</filter-class>
              <init-param>
                  <param-name>Cache-Control</param-name>
                  <param-value>private</param-value>
              </init-param>
              <init-param>
                  <param-name>Pragma</param-name>
                  <param-value></param-value>
              </init-param>
              <init-param>
                  <param-name>Expires</param-name>
                  <param-value>Wed, 1 Jan 2020 20:00:00 GMT</param-value>
              </init-param>
          </filter>
          <filter>
              <filter-name>PngCacheFilter</filter-name>
              <filter-class>rubiconx.web.common.HeaderFilter</filter-class>
              <init-param>
                  <param-name>Cache-Control</param-name>
                  <param-value>private</param-value>
              </init-param>
              <init-param>
                  <param-name>Pragma</param-name>
                  <param-value></param-value>
              </init-param>
              <init-param>
                  <param-name>Expires</param-name>
                  <param-value>Wed, 1 Jan 2020 20:00:00 GMT</param-value>
              </init-param>
          </filter>
          <filter>
              <filter-name>CssCacheFilter</filter-name>
              <filter-class>rubiconx.web.common.HeaderFilter</filter-class>
              <init-param>
                  <param-name>Cache-Control</param-name>
                  <param-value>private</param-value>
              </init-param>
              <init-param>
                  <param-name>Pragma</param-name>
                  <param-value></param-value>
              </init-param>
              <init-param>
                  <param-name>Expires</param-name>
                  <param-value></param-value>
              </init-param>
          </filter>
          
          <!-- This filter allows emulation of IE7 on IE8 browsers -->
          <filter>
              <filter-name>IE8Filter</filter-name>
              <filter-class>rubiconx.web.common.HeaderFilter</filter-class>
              <init-param>
                  <param-name>X-UA-Compatible</param-name>
                  <param-value>IE=EmulateIE8</param-value>
              </init-param>
          </filter>
         
          
          <!--#############################-->
          <!-- FILTER MAPPING SECTION -->
          <!--#############################-->
         
          
          <filter-mapping>
              <filter-name>SwfCacheFilter</filter-name>
              <url-pattern>*.swf</url-pattern>
          </filter-mapping>
          <filter-mapping>
              <filter-name>JsCacheFilter</filter-name>
              <url-pattern>*.js</url-pattern>
          </filter-mapping>
          <filter-mapping>
              <filter-name>JpgCacheFilter</filter-name>
              <url-pattern>*.jpg</url-pattern>
          </filter-mapping>
          <filter-mapping>
              <filter-name>GifCacheFilter</filter-name>
              <url-pattern>*.gif</url-pattern>
          </filter-mapping>
          <filter-mapping>
              <filter-name>PngCacheFilter</filter-name>
              <url-pattern>*.png</url-pattern>
          </filter-mapping>
          <filter-mapping>
              <filter-name>CssCacheFilter</filter-name>
              <url-pattern>*.css</url-pattern>
          </filter-mapping>
          
          <filter-mapping>
              <filter-name>StaticCacheFilter</filter-name>
              <url-pattern>*.js.xhtml</url-pattern>
          </filter-mapping>
          
          <filter-mapping>
              <filter-name>StaticCacheFilter</filter-name>
              <url-pattern>*.css</url-pattern>
          </filter-mapping>           
          <filter-mapping>
              <filter-name>StaticCacheFilter</filter-name>
              <url-pattern>*.js</url-pattern>
          </filter-mapping>       
          
          <filter-mapping>
              <filter-name>Authentication Filter</filter-name>
              <url-pattern>/*</url-pattern>
          </filter-mapping>
          
         
          <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
          <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>*</url-pattern>
          </filter-mapping>
      
          <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  -->
          <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
          </filter-mapping>
          
          <filter-mapping>
              <filter-name>IE8Filter</filter-name>
              <url-pattern>*</url-pattern>
          </filter-mapping>
          <!--#############################-->
          <!-- SERVLET DECLARATION SECTION -->
          <!--#############################-->
          <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>1</load-on-startup>
          </servlet>
         <servlet>
              <servlet-name>ResetPassword</servlet-name>
              <servlet-class>rubiconx.web.common.authenticator.ResetPassword</servlet-class>
              <load-on-startup>95</load-on-startup>
         </servlet>
         <servlet>
              <servlet-name>Authenticate</servlet-name>
              <servlet-class>rubiconx.web.farmconnect.common.FarmConnectTimezoneAuthenticate</servlet-class>
              <init-param>
                  <param-name>loginPage</param-name>
                  <param-value>/index.xhtml</param-value>
              </init-param>
              <init-param>
                  <param-name>resetPinResult</param-name>
                  <param-value>/reset.xhtml</param-value>
              </init-param>        
              <init-param>
                  <param-name>successPage</param-name>
                  <param-value>/farmconnect/homeNavigation.xhtml</param-value>
              </init-param>
              <init-param>
                  <param-name>authenticator</param-name>
                  <param-value>rubiconx.web.waterportal.extensions.farmconnect.FarmConnectAuthenticator</param-value>
              </init-param>
              <init-param>
                  <param-name>resumeAfterLogin</param-name>
                  <param-value>false</param-value>
              </init-param>
              <init-param>
                  <param-name>sessionTimeout</param-name>
                  <param-value>14400</param-value>
              </init-param>
              <load-on-startup>2</load-on-startup>
          </servlet>
          <!-- File Serving Servlet -->
          <servlet>
              <servlet-name>ServeFile</servlet-name>
              <servlet-class>rubiconx.web.common.ServeFile</servlet-class>
              <init-param>
                  <param-name>location</param-name>
                  <param-value>C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\farmconnect-agronomist-portal\temp</param-value>
              </init-param>
          </servlet>
          
          <servlet>
              <servlet-name>ProbeTrendDataSource</servlet-name>
              <servlet-class>rubiconx.farmconnect.web.common.servlet.ProbeTrendDataSource</servlet-class>
          </servlet>
          
          <!--#############################-->
          <!-- SERVLET MAPPING SECTION     -->
          <!--#############################-->
          <servlet-mapping>
              <servlet-name>ProbeTrendDataSource</servlet-name>
              <url-pattern>/ProbeTrendDataSource</url-pattern>
          </servlet-mapping>
          
          <servlet-mapping>
              <servlet-name>ResetPassword</servlet-name>
              <url-pattern>/ResetPassword</url-pattern>
          </servlet-mapping>
          
          <servlet-mapping>
              <servlet-name>Authenticate</servlet-name>
              <url-pattern>/Authenticate</url-pattern>
          </servlet-mapping>
          <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.xhtml</url-pattern>
          </servlet-mapping>
          
          <servlet-mapping>
              <servlet-name>ServeFile</servlet-name>
              <url-pattern>/ServeFile</url-pattern>
          </servlet-mapping>
          
          <!--#############################-->
          <!-- LISTENER SECTION            -->
          <!--#############################-->
          <listener>
              <listener-class>rubiconx.web.common.authenticator.AuthenticateSessionListener</listener-class>
          </listener>
          <listener>
              <listener-class>rubiconx.web.common.dbAdaptor.DatabaseAdaptor</listener-class>
          </listener>
          
          <listener>
              <listener-class>rubiconx.web.farmconnect.irrigator.guice.IrrigatorGuiceAdaptor</listener-class>
          </listener>
          <listener>
              <listener-class>rubiconx.farmconnect.web.common.servlet.FarmConnectServletContextListener</listener-class>
          </listener>
          <!--#############################-->
          <!-- MIME MAPPING SECTION            -->
          <!--#############################-->
          <mime-mapping>
              <extension>html</extension>
              <mime-type>text/html</mime-type>
          </mime-mapping>
          <mime-mapping>
              <extension>txt</extension>
              <mime-type>text/plain</mime-type>
          </mime-mapping>
          
      </web-app>