1 Reply Latest reply on Nov 17, 2011 3:08 AM by Roy Song

    Richfaces and eclipse configuration issue

    Roy Song Newbie

      hi,

       

      I am a newbie for eclipse, jsf and richfaces. I have a problem that Richfaces application cannot work in eclipse IDE, whereas the JSF application works.

       

      I use eclipse Indigo(Build id: 20110916-0149), tomcat 7.0.14, and installed the Jboss tools(3.3) from Eclipse Marketplace. I can create JSF application by clicking File -> New -> Project -> Jboss tools web -> JSF -> JSF project, with the JSF 2.0 for JSF environment. However, JSF pages cannot be viewed in the eclipse IDE, IE, and Firefox. It complains that HTTP Status 404 - The requested resource (/tt/NewFile.jsf) is not available. I don't know what's wrong with my configuration. I haven't searched the answer for my issue on the net. Does anyone know the solution?

       

      I can create JSF application by Dynamic Web Project and it works fine. However, when I follow the Richfaces developer guide(http://docs.jboss.org/richfaces/latest_4_0_X/Developer_Guide/en-US/html/chap-Developer_Guide-Getting_started_with_RichFaces.html#sect-Developer_Guide-Getting_started_with_RichFaces-Creating_a_project_with_JBoss_Tools) to add Richfaces to my JSF application, the JSF page cannot be found by returning HTTP Status 404. I used two methods to add Richfaces support to my existing JSF application, one is copying 4 richfaces jar files into WEB-INF/lib folder by right clicking the lib folder and then selecting "paste", the other is right clicking the project name in the Project Explorer, and then select Configure -> Add Custom Capabilities -> JBoss Richfaces 3.3 in the popup menu. The result is the same for these two adding methods. When I remove the bellow part from web.xml file, the JSF page works fine. Does anyone have an idea about this?

       

      <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>

       

      By the way, I can run Richfaces sample application(richfaces-start, which uses richfaces 3.3.3, I forget where I downloaded it.) in my eclipse IDE.

       

      Does anyone give me a hand for this?

       

      Attached my sample project for your reference.

       

      Thanks in advance!

      Roy