7 Replies Latest reply on Jul 10, 2007 8:57 AM by 3.pravin

    Installation and deployment issue

    sodium

      New user to both ajax4jsf and richfaces. I am wondering what are the other dependencies files required for installation of richfaces for deployment under Tomcat 6.0 container and JDK 1.5.

      I followed the instructions in the developer guide. Web-INF/lib contains ajax4jsf-1.1.1.jar, richfaces-3.0.1.jar and oscache2.3.2.jar. My web.xml contains as followed:

      <web-app>
      
      <!-- 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>
      
      <!-- Faces Servlet Mapping -->
      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>
      
      <filter>
      <display-name>Ajax4jsf Filter</display-name>
      <filter-name>ajax4jsf</filter-name>
      <filter-class>org.ajax4jsf.Filter</filter-class>
      </filter>
      <filter-mapping>
      <filter-name>ajax4jsf</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      <dispatcher>REQUEST</dispatcher>
      <dispatcher>FORWARD</dispatcher>
      <dispatcher>INCLUDE</dispatcher>
      </filter-mapping>
      
      </web-app>
      


      I keep getting 404 not found even for index.html which contain only normal html tag. Even though i tried removing the filter and filter-mapping in my web.xml, its still giving me 404 error until i remove the .jar as well. Any advice will be much appreciated.

        • 1. Re: Installation and deployment issue

          oscache2.3.2.jar is not required since Ajax4jsf 1.1.1.

          Did your application run successfully before you added the files mentioned above?

          • 2. Re: Installation and deployment issue
            sodium

            It work fine if i just testing using normal JSF components. I forgot to mention the JSF libraries which i installed:

            I have jsf-api.jar and jsf-impl.jar from http://javaserverfaces.dev.java.net
            I have standard.jar and jstl.jar from http://people.apache.org/builds/jakarta-taglibs/nightly
            They are located in Tomcat /lib folder
            These works fine with examples that i am learning via CoreJSF book.

            I am guessing i must be missing some other files. Do i need MyFaces commons-xxxx.jar and myfaces-xxxx.jar as well? Cause i tried installing those jar into my Tomcat/lib and end up with 505 status error instead.

            java.lang.UnsupportedOperationException
             javax.faces.application.Application.getELResolver(Application.java:455)
             com.sun.faces.context.FacesContextImpl.getELContext(FacesContextImpl.java:174)
             javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:888)
             com.sun.faces.application.ViewHandlerImpl.createView(ViewHandlerImpl.java:375)
             org.ajax4jsf.framework.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:84)
             org.ajax4jsf.framework.ajax.AjaxViewHandler.createView(AjaxViewHandler.java:87)
             org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:83)
             org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
             org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
             javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
             org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
             org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
            


            Much appreciated if anyone can point me in the right direction of all the files that are needed for deploying richfaces step by step.

            • 3. Re: Installation and deployment issue
              3.pravin

              Hello frnds, am new to JSF and I'd like to include richfaces components in my application, I downloaded a zipped version of richfaces 3.0.1 but I cannot find the richfaces-3.0.1.jar file in it..could someone please let me where to find that file and how to include in my application? tons of thanks cheers

              • 4. Re: Installation and deployment issue
                sodium

                Once extracted, look under richfaces-3.0.1\lib folder, there u should find both ajax4jsf-1.1.1.jar and richfaces-3.0.1.jar

                • 5. Re: Installation and deployment issue
                  3.pravin

                  Thanks sodium. am really sorry I dont find a lib folder in my richfaces-3.0.1, I have lib folders from the demo applications WEB-INF folder but not in the extracted richfaces-3.0.1. Any help would be greatly appreciated. cheers

                  • 6. Re: Installation and deployment issue
                    3.pravin

                    I found the jar files and made my first application work with richfaces. Thanks again sodium!

                    • 7. Re: Installation and deployment issue
                      3.pravin

                      Hello frnds just to share how I made the application work

                      I made the filter settings for ajax4jsf first then made the listener for application in web.xml which looks something like this,

                      ....


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


                      <filter-mapping>
                      <filter-name>ajax4jsf</filter-name>
                      <servlet-name>Faces Servlet</servlet-name>
                      REQUEST
                      FORWARD
                      INCLUDE
                      </filter-mapping>

                      <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>


                      .....

                      hope it helps someone!

                      Cheers