Problema no Richfaces comJSF 2.0

3 respostas
F

estou com varias dificuldades pra usar RichFaces com meu projeto JSF 2.0

primeiro, ele não está navegando nas paginas, ou seja, quando uso um commandButton ou commandLink eu redireciono ele explicitamente , mas nao funciona, ele da erro 404

segundo, sempre aparece este erro

GRAVE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

eu uso o netbeans, e algumas vezes ocorreu comigo o erro dizendo que o modulo não tinha sido implementado, alguém sabe o motivo ou os motivos de tão erro?

ai esta meu faces-config

<?xml version="1.0"?>
<faces-config 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-facesconfig_2_0.xsd"
   version="2.0">
  <!--  Empty for now. Your entries will go here. But even
        if you have no entries in faces-config.xml, you are required
        to have a valid faces-config.xml file with legal 
        start and end tags.
        
        From JSF 2.0 tutorial at http://www.coreservlets.com/JSF-Tutorial/jsf2/ -->
</faces-config>

e o meu web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  version="2.5">
  <!-- The bare minimum needed for JSF 2.0 is a servlet 2.5
      declaration and the mapping for the FacesServlet.
      Setting PROJECT_STAGE to Development is highly recommended
      during initial development so that you get more helpful
      error messages.
      
      From JSF 2.0 tutorial at http://www.coreservlets.com/JSF-Tutorial/jsf2/
  -->
<!-- Plugging the "Blue Sky" skin into the project -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<!-- Making the RichFaces skin spread to standard HTML controls -->
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
<!-- Defining and mapping the RichFaces filter -->
<filter>

   <display-name>RichFaces Filter</display-name>

   <filter-name>richfaces</filter-name>

   <filter-class>org.ajax4jsf.Filter</filter-class>

</filter>



<filter-mapping>

   <filter-name>richfaces</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>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
  <context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
  </context-param>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
</web-app>

ps: ele ja reconhece os componentes do richfaces

3 Respostas

Diego_Adriano

Cara, eu tb tive esse problema com o RichFaces e resolvi mudando para PrimeFaces, muito mais simples de usar …
É so jogar o .Jar na Lib e add ao ClassPath que já esta funcionando.

Abraços … Boa Sorte

Polverini

Qual a versao do richfaces ?? se nao me engano para suporte ao jsf 2.0 usa-se o richfaces 3.3.3 ou 4 alpha, o prime ja da suporte total (eu acho), para o jsf 2 nao precisa do faces-config.xml.
Poste os códigos da pagina e classe

F

acabei optando por usar o primefaces mesmo, pelo menos enquanto nao sai a versao 4 estavel, valeu

Criado 11 de fevereiro de 2011
Ultima resposta 21 de fev. de 2011
Respostas 3
Participantes 3