Richfaces + JSF 2.0 + Java EE6

5 respostas
danielfigueiredoc

Pessoal boa tarde!

Novamente venho pedir uma ajuda, é o seguinte, eu configurei meu projeto web com JPA e tudo mais, ficou ótimo. Porém quando fui adicionar as coisas mais óbvias e simples como o richfaces me tomaram dois dias e nada de progresso.
Já tentei milhões configurações no web.xml e nada.
Eu entrei no site do jboss e baixei a versão 3.3.3 CR1 e coloquei a lib richfaces-imp-jsf2-3.3.3-CR1 no lugar da imp normal, como o próprio site informa.
Não da erro nenhum, só que a página vem em branco, o mais estranho é que eu coloquei um componente do próprio jsf/html um h:commandButton e ele também não aparece. Mesmo retirando tudo (richfaces, a4j) e só deixando a tag dele, ele também não aparece.
Então sei sei se é somente o richfaces ou algo que estou fazendo de errado.

web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 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_3_0.xsd">

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

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

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

    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <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>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>

</web-app>
minha página xhtml:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <a4j:form>
            teste
            <rich:panel header="teste">//não aparece
                teste//aparece
                <h:commandButton label="auehuaeh" action="#{Teste.teste('Voilá')}"/> //não aparece
            </rich:panel>
            <ui:insert name="body"/>
        </a4j:form>
    </h:body>
</html>

Alguma sugestão?!!

Abraços

5 Respostas

viniciusfaleiro

Cara… é um saco configurar isso… fiquei uns 3 dias… se quiser manda MP que eu te envio os jars certinho da minha app e os XLM… To com Hibernate + JSF + RICH no glassfish 2.2.1

danielfigueiredoc

Mas você configurou com o JSF 2.0 e o Java EE6, se sim já te mandei a mensagem, se tiver como por favor me informar as configurações.

Abraço

edson.goncalez

Alguém consegiu fazer rodar ? To tentando com o JBoss 6 e RichFaces 4 Alpha-1 até agora nada.

Postem no fórum a resposta, para todos poderem aproveitar.

Att.
Edson.

tnaires

Aproveitando a ressureição do tópico, só pra lembrar que a versão 3.x do Richfaces é compatível com a versão 1.2 do JSF. Para o JSF 2.0, devemos esperar a versão 4 do Richfaces, ou podemos usar o Primefaces como alternativa.

W
Faça um teste alterando o import da página para :

<%@ page language=java contentType=text/html; charset=ISO-8859-1 pageEncoding=ISO-8859-1%>

<%@ taglib uri=<a href="http://java.sun.com/jsf/html">http://java.sun.com/jsf/html</a> prefix=h %>

<%@ taglib uri=<a href="http://java.sun.com/jsf/core">http://java.sun.com/jsf/core</a> prefix=f %>

<%@ taglib uri=<a href="http://richfaces.org/a4j">http://richfaces.org/a4j</a> prefix=a4j%>

<%@ taglib uri=<a href="http://richfaces.org/rich">http://richfaces.org/rich</a> prefix=rich%>

e altere tambem a extensão para .jsp mais chame pelo seu faces-config como .jsf.

Veja se no lib do seu web-inf existem os jars:

commons-beanutils-1.7.0.jar
commons-collections-3.2.jar
commons-digester-1.8.jar
commons-logging-1.0.4.jar
jhighlight-1.0.jar
richfaces-api-3.3.2.SR1.jar
richfaces-impl-3.3.2.SR1.jar
richfaces-ui-3.3.2.SR1.jar

Este web.xml funciona:

<?xml version="1.0" encoding="UTF-8"?> contasreceber javax.faces.CONFIG_FILES /WEB-INF/beans.xml, /WEB-INF/navigation.xml, /WEB-INF/converters.xml javax.faces.STATE_SAVING_METHOD server org.richfaces.SKIN blueSky org.richfaces.CONTROL_SKINNING enable RichFaces Filter richfaces org.ajax4jsf.Filter richfaces Faces Servlet REQUEST FORWARD INCLUDE com.sun.faces.config.ConfigureListener Faces Servlet javax.faces.webapp.FacesServlet 1 Faces Servlet *.jsf index.html index.htm index.jsp index.jsf
Criado 20 de fevereiro de 2010
Ultima resposta 10 de mai. de 2010
Respostas 5
Participantes 5