6 Replies Latest reply on Mar 17, 2008 7:27 PM by jbalunas.jbalunas.jboss.org

    RichFaces Javascript files not found

    cleverswine

      Hi,


      Whenever I use a richfaces component on a page, none of the corresponding a4j/richfaces javscript files are loaded by the browser. It's as if the RichFaces Ajax filter isn't installed. My web.xml is:




        <listener>
          <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
        </listener>
      
        <filter>
          <filter-name>Seam Filter</filter-name>
          <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
        </filter>
      
        <filter-mapping>
          <filter-name>Seam Filter</filter-name>
          <url-pattern>/*</url-pattern>
        </filter-mapping>
      
        <servlet>
          <servlet-name>Seam Resource Servlet</servlet-name>
          <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
        </servlet>
      
        <servlet-mapping>
          <servlet-name>Seam Resource Servlet</servlet-name>
          <url-pattern>/seam/resource/*</url-pattern>
        </servlet-mapping>
      
        <!-- JSF and Facelets -->
      
        <context-param>
          <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
          <param-value>.xhtml</param-value>
        </context-param>
      
        <context-param>
          <param-name>facelets.DEVELOPMENT</param-name>
          <param-value>true</param-value>
        </context-param>
      
       <!-- <context-param>
           <param-name>com.sun.faces.expressionFactory</param-name>
           <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
        </context-param> -->
      
        <context-param>
             <param-name>org.richfaces.SKIN</param-name>
          <param-value>blueSky</param-value>
        </context-param>
          
        <context-param>
           <param-name>com.sun.faces.displayConfiguration</param-name>
           <param-value>true</param-value>
        </context-param>      
      
      <context-param>
          <param-name>org.jboss.seam.core.init.debug</param-name>
          <param-value>true</param-value>
      </context-param>
      
        <!-- Faces Servlet -->
      
        <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>*.seam</url-pattern>
        </servlet-mapping>
       
        <ejb-local-ref>
          <ejb-ref-name>expressionbuilder/MemberSearchAction</ejb-ref-name>
          <ejb-ref-type>Session</ejb-ref-type>
           <local-home></local-home>
          <local>com.bbh.expressionbuilder.service.MemberSearch</local>
        </ejb-local-ref>
      
           <welcome-file-list>
                <welcome-file>index.html</welcome-file>
           </welcome-file-list>
      
        <session-config>
          <session-timeout>8</session-timeout> 
        </session-config> 
      </web-app>



      What am I missing? Thank you in advance for any help.

        • 1. Re: RichFaces Javascript files not found
          pmuir

          What app server? I think you aren't on JBoss - always lay out your environment when asking a question.

          • 2. Re: RichFaces Javascript files not found
            modoc

            Bill,


            are you using Apache to proxy requests to your app server?  I had an issue where a poorly configured ReverseProxy was breaking only the RichFaces JS calls (not sure why).  By fixing the proxy config, things worked again.


            Just a thought.


            Devon

            • 3. Re: RichFaces Javascript files not found
              cleverswine

              Hi Peter and Devon, thanks for the replies. The app server is IBM Websphere 6.1, and I'm not using Apache to proxy requests. This is a development environment, so everything is within Rational Application Developer (which is essentially Eclipse with a bunch of IBM plug-ins).


              Any other ideas?


              Bill

              • 4. Re: RichFaces Javascript files not found
                jbalunas.jbalunas.jboss.org

                Take a look a the reference guide - for all the details.
                websphere reference chapter


                Also my blog WebSphere Seam Integration


                The problem is that you need to set a customer web container property.


                com.ibm.ws.webcontainer.invokefilterscompatibility = "true"



                Details are in the docs.

                • 5. Re: RichFaces Javascript files not found
                  benmoore

                  Thanks, Jay, you were right. I've read that reference guide 18 or more times. I had those properties set originally, but I've since changed servers and forgot to set them on the new server.


                  Thanks for writing that chapter as well as your blog post... many companies wouldn't be using Seam if not for you. Since many places which use Websphere are IBM shops and therefore use DB2 as their database, I'd like to contribute the changes to persistence.xml and the WAS server I had to make in order to get DB2 working with Seam/Hibernate/EJB3/WAS. Would you be interested in adding this to the chapter since it only talks about Apache Derby integration? ( and no one uses Derby in production :-) )

                  • 6. Re: RichFaces Javascript files not found
                    jbalunas.jbalunas.jboss.org

                    Those custom web properties are tricky and hard to find the real issue.


                    I really appreciate those kind words - thank you!


                    For your DB2 info - you could post them here so people can see them, or better yet you could create a Jira with the information and a unified diff of the changes. 


                    That way the information can be tracked, and someone, probably me :), can get the information integrated.


                    Thanks again,
                    jay