1 Reply Latest reply on Jan 26, 2009 5:09 AM by Ilya Shaikovsky

    RichFaces is not defined...

    Tomas Jadzevicius Newbie

      Hi,
      i want to use richfaces 3.3.0.GA framework with myfaces 1.2.5. Unfortunately i am dealing with a strange situation, it looks like that resources are not loaded (js libs, css styles).
      For example if i use <rich:calendar.. in my page, i can see a simple input field with a calendar icon, but it does not work. In addition firebug says "Calendar is not defined".
      Could you please tell me what i am doing wrong?
      My web.xml configuration:

      <?xml version="1.0" encoding="UTF-8"?>

      <web-app version="2.5"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/
      javaee/web-app_2_5.xsd">


      <display-name>
      test</display-name>


      <!-- Context params -->
      <context-param>
      <param-name>javax.faces.CONFIG_FILES</param-name>
      <param-value>/WEB-INF/faces-config.xml</param-value>
      </context-param>

      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>server</param-value>
      </context-param>

      <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>blueSky</param-value>
      </context-param>

      <context-param>
      <param-name>org.richfaces.CONTROL_SKINNING</param-name>
      <param-value>enable</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
      <param-value>20</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.VALIDATE</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>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
      <param-value>false</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
      <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
      </context-param>

      <context-param>
      <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.jspx</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.ajax4jsf.VIEW_HANDLERS</param-name>
      <param-value>com.sun.facelets.FaceletViewHandler</param-value>
      </context-param>

      <context-param>
      <param-name>facelets.VIEW_MAPPINGS</param-name>
      <param-value>*.jsp</param-value>
      </context-param>

      <context-param>
      <param-name>facelets.REFRESH_PERIOD</param-name>
      <param-value>1</param-value>
      </context-param>

      <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      <param-name>facelets.SKIP_COMMENTS</param-name>
      <param-value>true</param-value>
      </context-param>


      <!-- Servlets -->


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



      <servlet-name>resources</servlet-name>
      <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
      <load-on-startup>3</load-on-startup>


      <!-- Servlet mappings -->

      <servlet-mapping>
      <servlet-name>faces</servlet-name>
      <url-pattern>/faces/*</url-pattern>
      </servlet-mapping>

      <servlet-mapping>
      <servlet-name>resources</servlet-name>
      <url-pattern>/adf/*</url-pattern>
      </servlet-mapping>


      <!-- Filters -->
      <!-- RichFaces Filter must be first among other filters -->

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



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


      <!-- Filter mappings -->

      <filter-mapping>
      <filter-name>richfaces</filter-name>
      <servlet-name>faces</servlet-name>
      REQUEST
      FORWARD
      INCLUDE
      </filter-mapping>

      <filter-mapping>
      <filter-name>trinidad</filter-name>
      <servlet-name>faces</servlet-name>
      </filter-mapping>


      <!-- Welcome files -->

      <welcome-file-list>
      <welcome-file>index.jspx</welcome-file>
      </welcome-file-list>
      </web-app>