RichFaces + Tomahawk + Facelets, não renderiza o xhtml

Pessoal to tentando fazer esses três funcionarem juntos…

coloquei jars do richfaces, myfaces, tomahawk, facelets, e o xml da taglib do facelets…

projeto roda porém ele acha o .xhtml, se eu colocar .jsf ele dá erro 404, ou seja, facelets não está renderizando o jsf…

não aparece erro nenhum no console, nem no conteiner… alguém passou por isso…?

já usei richfaces com facelets sem problemas, e richfaces com tomahawk também rodou…porém quando coloca o facelets nesses dois…já era…

vlw a todos.

Você setou o SUFFIX do Facelets no seu xml?

setado direitinho :frowning:

 <context-param>
  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
  <param-value>.xhtml</param-value>
 </context-param>

Po cara, não sei se vai ajudar, mas minha app eu uso RichFaces + MyFaces + Seam, ó o web.xml aí:

...
    <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>
		<load-on-startup>1</load-on-startup>
	</servlet>
		
	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.faces</url-pattern>
	</servlet-mapping>
	
    <context-param>
        <param-name>org.richfaces.SKIN</param-name>
        <param-value>DEFAULT</param-value>
    </context-param>
    
    <context-param>  
        <param-name>org.richfaces.CONTROL_SKINNING</param-name>  
        <param-value>enable</param-value>  
    </context-param>  
    
    <context-param>  
        <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>  
        <param-value>enable</param-value>  
    </context-param>  

	<context-param>
		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
		<param-value>.xhtml</param-value>
	</context-param>
...

E no faces-config…

...
<application>
    <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application> 
...

Funciona muito bem…

Olá pessoal!

Estou passando pelo mesmo problema. No meu index.html eu tenho um redirecionamento para uma outra página. Como segue abaixo.

<html> <head> <meta http-equiv="Refresh" content="0;url=home.jsf"> </head> </html> Só que o redirecionamento não acontece. O faces-config.xml está da mesma maneira que o Raul falou, e o web.xml está muito semelhante também. A única coisa diferente seria o servlet-mapping, onde no meu arquivo está *.jsf e no exemplo está *.faces. Mesmo colocando *.faces, não está funcionando. Ou seja, o redirecionamento está resultando no erro 404. A minha suspeita é que o arquivo web.xml possa estar faltando algo.
Segue abaixo o web.xml e o faces-config.xml.

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" id="WebApp_ID" version="2.5"> <display-name>AjaxCrudApp</display-name> <context-param> <param-name>javax.faces.DEFAULT_SUFFIX</param-name> <param-value>.xhtml</param-value> </context-param> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>ruby</param-value> </context-param> <context-param> <param-name>org.richfaces.CONTROL_SKINNING</param-name> <param-value>enable</param-value> </context-param> <context-param> <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name> <param-value>enable</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> <param-value>com.sun.facelets.FaceletViewHandler</param-value> </context-param> <context-param> <param-name>facelets.DEVELOPMENT</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>com.sun.faces.verifyObjects</param-name> <param-value>true</param-value> </context-param> <filter> <display-name>RichFaces Filter</display-name> <filter-name>richfaces</filter-name> <filter-class>org.ajax4jsf.Filter</filter-class> </filter> <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> <filter-mapping> <filter-name>richfaces</filter-name> <servlet-name>Faces Servlet</servlet-name> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> </filter-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> <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> </web-app>
faces-config.xml:

[code]<?xml version="1.0" encoding="UTF-8"?>

<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_1_2.xsd
version=“1.2”>

<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>

<managed-bean>
<managed-bean-name>usuarioCrudFaces</managed-bean-name>
<managed-bean-class>info.fabiano.example.faces.UsuarioCrudFaces</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>

</faces-config>[/code]
Espero que possam me ajudar.
Grato desde então.

Pessoal, estou com este mesmo problema.

no meu projeto o welcomeFile chama um xhtml que este “herda” da template… No entanto só da o erro 404 e não aparece nada na consele nem no log do conteinner.

o web.xml está setado o sufixo e no faces já configurei o viewHandler.

[]s

Glauco Soares

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 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"&gt;
    &lt;display-name&gt;Cadastro&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
        &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
        &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
        &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;javax.faces.DEFAULT_SUFFIX &lt;/param-name&gt;
        &lt;param-value&gt;.xhtml &lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;facelets.DEVELOPMENT &lt;/param-name&gt;
        &lt;param-value&gt;true &lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;com.sun.faces.validateXml &lt;/param-name&gt;
        &lt;param-value&gt;false &lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;com.sun.faces.verifyObjects &lt;/param-name&gt;
        &lt;param-value&gt;true &lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;servlet&gt;
        &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
        &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
        &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
        &lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;org.ajax4jsf.SKIN&lt;/param-name&gt;
        &lt;param-value&gt;ruby&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;filter&gt;
        &lt;display-name&gt;Ajax4jsf Filter&lt;/display-name&gt;
        &lt;filter-name&gt;ajax4jsf&lt;/filter-name&gt;
        &lt;filter-class&gt;org.ajax4jsf.Filter&lt;/filter-class&gt;
    &lt;/filter&gt;
    &lt;filter-mapping&gt;
        &lt;filter-name&gt;ajax4jsf&lt;/filter-name&gt;
        &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
        &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
        &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
        &lt;dispatcher&gt;INCLUDE&lt;/dispatcher&gt;
    &lt;/filter-mapping&gt;
    &lt;filter&gt;
        &lt;display-name&gt;AuthFilter&lt;/display-name&gt;
        &lt;filter-name&gt;AuthFilter&lt;/filter-name&gt;
        &lt;filter-class&gt;br.gov.nutec.filtro.AuthFilter&lt;/filter-class&gt;
    &lt;/filter&gt;
    &lt;filter-mapping&gt;
        &lt;filter-name&gt;AuthFilter&lt;/filter-name&gt;
        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;facelets.SKIP_COMMENTS&lt;/param-name&gt;
        &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;org.richfaces.SKIN&lt;/param-name&gt;
        &lt;!--&lt;param-value&gt;emeraldTown&lt;/param-value&gt;--&gt;
        &lt;!--&lt;param-value&gt;classic&lt;/param-value&gt;--&gt;
        &lt;!-- &lt;param-value&gt;blueSky&lt;/param-value&gt; --&gt;
         &lt;param-value&gt;ruby&lt;/param-value&gt; 
        &lt;!-- &lt;param-value&gt;wine&lt;/param-value&gt; --&gt;
        &lt;!--&lt;param-value&gt;deepMarine&lt;/param-value&gt;--&gt;
        &lt;!--  &lt;param-value&gt;japanCherry&lt;/param-value&gt; --&gt;
        &lt;!-- &lt;param-value&gt;plain&lt;/param-value&gt; --&gt;
    &lt;/context-param&gt;
    &lt;context-param&gt;
        &lt;param-name&gt;org.richfaces.CONTROL_SKINNING&lt;/param-name&gt;
        &lt;param-value&gt;enable&lt;/param-value&gt;
    &lt;/context-param&gt;
&lt;/web-app&gt;