7 Replies Latest reply on Sep 12, 2007 7:24 AM by Mike Sauer

    Ajax4JSF Trinidad Integration

    Kevin Gutch Newbie

      Hi I am trying to integrate Trinidad into an existing application. I have tried to follow the example given online. My app gets to my first facelets page but only displays the page title in the browser window.

      My web.xml is below. Can anyone tell me what I am doing wrong?

      <?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">
       <description>Express Web Application</description>
       <display-name>Express Web Application</display-name>
       <context-param>
       <param-name>javax.faces.CONFIG_FILES</param-name>
       <param-value>/WEB-INF/faces_config_ex.xml,/WEB-INF/faces_config_app.xml,/WEB-INF/faces_config_universal.xml</param-value>
       </context-param>
       <context-param>
       <param-name>facelets.SKIP_COMMENTS</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
       <param-value>com.sun.facelets.FaceletViewHandler</param-value>
       </context-param>
       <context-param>
       <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
       <param-value>.xhtml</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.DEVELOPMENT</param-name>
       <param-value>false</param-value>
       </context-param>
       <context-param>
       <param-name>com.sun.faces.validateXml</param-name>
       <param-value>false</param-value>
       </context-param>
       <context-param>
       <param-name>com.sun.faces.verifyObjects</param-name>
       <param-value>false</param-value>
       </context-param>
       <context-param>
       <param-name>facelets.LIBRARIES</param-name>
       <param-value>/WEB-INF/tomahawk.taglib.xml;/WEB-INF/protech.taglib.xml;/WEB-INF/sandbox.taglib.xml</param-value>
       </context-param>
       <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>#{infoBean.skin}</param-value>
       </context-param>
       <!--setting to server over client is supposed to increase performance-->
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>server</param-value>
       </context-param>
       <context-param>
       <param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</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.resource.DEBUG</param-name>
       <param-value>true</param-value>
       </context-param>
       <!-- FaceletViewHandler configuration -->
       <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>facelets.VIEW_MAPPINGS</param-name>
       <param-value>*.xhtml</param-value>
       </context-param>
       <context-param>
       <param-name>org.apache.myfaces.trinidad.CACHE_VIEW_ROOT</param-name>
       <param-value>false</param-value>
       </context-param>
       <filter>
       <display-name>Ajax4jsf Filter</display-name>
       <filter-name>ajax4jsf</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       <!-- <init-param>
       <param-name>forceparser</param-name>
       <param-value>false</param-value>
       </init-param> -->
       </filter>
       <filter>
       <filter-name>trinidad</filter-name>
       <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
       </filter>
       <filter-name>ajax4jsf</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
       <filter-mapping>
       <filter-name>trinidad</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
       <servlet>
       <servlet-name>Faces Servlet</servlet-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <filter>
       <filter-name>extensionsFilter</filter-name>
       <filter-class>
       org.apache.myfaces.component.html.util.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>uploadMaxFileSize</param-name>
       <param-value>100m</param-value>
       </init-param>
       <init-param>
       <description>
       Set the threshold size - files below this limit are
       stored in memory, files above this limit are stored on
       disk.
       Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
       </description>
       <param-name>uploadThresholdSize</param-name>
       <param-value>100k</param-value>
       </init-param>
       <!--
       <init-param>
       <param-name>uploadRepositoryPath</param-name>
       <param-value>/temp</param-value>
       <description>Set the path where the intermediary files will be stored.
       </description>
       </init-param>
       -->
      </filter>
      <filter-mapping>
       <filter-name>extensionsFilter</filter-name>
       <url-pattern>*.faces</url-pattern>
      </filter-mapping>
      <filter-mapping>
       <filter-name>extensionsFilter</filter-name>
       <url-pattern>/faces/*</url-pattern>
      </filter-mapping>
      <filter-mapping>
       <filter-name>extensionsFilter</filter-name>
       <url-pattern>*.htm</url-pattern>
      </filter-mapping>
       <listener>
       <listener-class>com.protech.util.DBCPoolingListener</listener-class>
       </listener>
       <listener>
       <listener-class>com.protech.util.InitParams</listener-class>
       </listener>
      <servlet>
       <servlet-name>resources</servlet-name>
       <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
       </servlet>
       <servlet-mapping>
       <servlet-name>Faces Servlet</servlet-name>
       <url-pattern>*.htm</url-pattern>
       </servlet-mapping>
      
       <servlet-mapping>
       <servlet-name>resources</servlet-name>
       <url-pattern>/adf/*</url-pattern>
       </servlet-mapping>
       <login-config>
       <auth-method>BASIC</auth-method>
       </login-config>
       <!-- This component has a dependency on an external resource-->
       <resource-ref>
       <description>DB Connection Pooling</description>
       <res-ref-name>jdbc/drains</res-ref-name>
       <res-type>javax.sql.DataSource</res-type>
       <res-auth>Container</res-auth>
       <res-sharing-scope>Shareable</res-sharing-scope>
       </resource-ref>
      </web-app>