Erro JSF richfaces+facelets

1 resposta
T

Pessoal, estou querendo utilizar JSF com Facelets e RichFaces,

Sempre fiz uso do JSF com o Rich, mas estou tendo algumas dificuldades com estado de componentes então resolvi utilizar facelets, enfim, minha dúvida é o seguinte…

montei um exemplo JSF com facelets, esta funcionando blz, contudo quando vou adicionar as configurações do richfaces no web.xml, obtenho o erro:

This page contains the following errors:

error on line 12 at column 37: XML declaration allowed only at the start of the document
Below is a rendering of the page up to the first error.

Imagino que o problema esta sendo gerado por causa dos includes, pois esta incluindo as tags xml de cabeçalho varias vezes

aqui esta meu web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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_2_5.xsd">
    <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
    </context-param>
    <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>facelets.SKIP_COMMENTS</param-name>
        <param-value>true</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>*.jsf</url-pattern>
    </servlet-mapping>
    
    <context-param>
        <param-name>org.richfaces.SKIN</param-name>
        <param-value>blueSky</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>
    
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>master.jsp</welcome-file>
    </welcome-file-list>
    
</web-app>

Grato

1 Resposta

T

Pessoal não tinha percebido, o erro só acontece no chrome, vou colocar alguns componentes do richfaces para ver…

Criado 22 de dezembro de 2009
Ultima resposta 22 de dez. de 2009
Respostas 1
Participantes 1