1 Reply Latest reply on Apr 6, 2007 10:12 AM by Renzo Tomaselli

    Not working with Trinidad + Tomahawk + Myfaces

    Renzo Tomaselli Novice

      Hi, this is my first attempt to include Ajax4jsf into an existing project, which uses Trinidad (snapshot Dec. 2006) + Tomahawk (snapshot 1.1.5 Feb. 2007) + MyFaces (1.1.11).
      Modifications to web.xml occurred as documented in dev. guide, fairly simple.
      It doesn't work while rendering a page containing a4j:mediaOutput, I get:

      Resources framework is not initialised, check web.xml for Filter configuration,
      from ResourceBuilderImpl.java:107

      I also tried to set ajax4jsf filter as the first or the last, no success.
      My web.xml is:

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4" 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_4.xsd">
      Experiments
      <display-name>Axxento publisher</display-name>
      <!-- Trinidad -->
      <context-param>
      <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
      <param-value>false</param-value>
      </context-param>
      <context-param>
      <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>
      <param-value>com.sun.facelets.FaceletViewHandler</param-value>
      </context-param>
      <context-param>
      <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
      <param-value>false</param-value>
      </context-param>
      <context-param>
      <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
      <param-value>session</param-value>
      </context-param>
      <context-param>
      <param-name>org.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION</param-name>
      <param-value>true</param-value>
      </context-param>
      <!-- facelets -->
      <context-param>
      <param-name>facelets.REFRESH_PERIOD</param-name>
      <param-value>2</param-value>
      </context-param>
      <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</param-value>
      </context-param>
      <context-param>
      <param-name>facelets.LIBRARIES</param-name>
      <param-value>/tags/tomahawk.taglib.xml;
      /tags/conaxo.taglib.xml
      </param-value>
      </context-param>
      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>client</param-value>
      </context-param>
      <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
      </context-param>
      <!-- richfaces -->
      <context-param>
      <param-name>org.ajax4jsf.SKIN</param-name>
      <param-value>blueSky</param-value>
      </context-param>
      <!-- private -->
      <context-param>
      <param-name>javax.faces.CONFIG_FILES</param-name>
      <param-value>/WEB-INF/login-config.xml,
      /WEB-INF/header-config.xml,
      /WEB-INF/navigation-config.xml,
      /WEB-INF/navigator-config.xml,
      /WEB-INF/tabber-config.xml,
      /WEB-INF/menu-config.xml,
      /WEB-INF/tableConfig-config.xml,
      /WEB-INF/splitter-config.xml,
      /WEB-INF/databases-config.xml,
      /WEB-INF/docBrowser-config.xml,
      /WEB-INF/table-config.xml,
      /WEB-INF/tree-config.xml,
      /WEB-INF/lock-config.xml
      </param-value>
      </context-param>
      <!-- RichFaces filter -->

      <display-name>Ajax4jsf Filter</display-name>
      <filter-name>ajax4jsf</filter-name>
      <filter-class>org.ajax4jsf.Filter</filter-class>

      <!-- Trinidad filter -->

      <filter-name>trinidad</filter-name>
      <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>

      <!-- Tomahawk filter -->

      <filter-name>MyFacesExtensionsFilter</filter-name>
      <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
      <init-param>
      <param-name>maxFileSize</param-name>
      <param-value>20m</param-value>
      </init-param>

      <filter-mapping>
      <filter-name>trinidad</filter-name>
      <servlet-name>faces</servlet-name>
      </filter-mapping>
      <!-- extension mapping for adding , , and other resource tags to JSF-pages -->
      <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
      <servlet-name>faces</servlet-name>
      </filter-mapping>
      <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
      </filter-mapping>
      <filter-mapping>
      <filter-name>ajax4jsf</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      REQUEST
      FORWARD
      INCLUDE
      </filter-mapping>
      <!-- resource loader servlet -->

      <servlet-name>resources</servlet-name>
      <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>


      <servlet-name>faces</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>

      <servlet-mapping>
      <servlet-name>resources</servlet-name>
      <url-pattern>/adf/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
      <servlet-name>faces</servlet-name>
      <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
      <session-config>
      <session-timeout>1000</session-timeout>
      </session-config>
      <login-config>
      <auth-method>BASIC</auth-method>
      </login-config>
      </web-app>