Boa noite pessoal. Estou iniciando as atividades em JSF e Facelets e estou com um problema. Minha aplicacao nao da nenhum erro porem nao abre a pagina. Estou usando o TomCat 6.0.18 com JSF 1.2 e Facelet 1.1.14. As bibliotecas que estao na lib sao:
jsf-api-1.2_04-p002.jar
jsf-facelets.jar
jsf-impl.jar
log4j-1.2.11.jar
portlet.jar
Meu web.xml esta assim:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!-- Usa como documentos salvos como .xhtml -->
<context-param>
<param-name>javax.faces.DEFULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!-- Saida de debug especial para desenvolvimento -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!-- Parametros opcionais JSF-RI para ajudar a DEBUG -->
<context-param>
<param-name>com.sum.faces.validateXML</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sum.faces.verifyObjects</param-name>
<param-value></param-value>
</context-param>
<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Faces Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<display-name>Template</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
Meu faces-config.xml
<?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" >
<!-- from project setup -->
<application>
<view-handler>
com.sun.facelets.FaceletViewHandler
</view-handler>
</application>
<!-- our NumberBean we just created (Manager Bean) -->
<managed-bean>
<managed-bean-name>NumberBean</managed-bean-name>
<managed-bean-class>tutorial.NumberBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>min</property-name>
<value>1</value>
</managed-property>
<managed-property>
<property-name>max</property-name>
<value>10</value>
</managed-property>
</managed-bean>
<!-- indo de guess.xhtml para response.xhtml -->
<navigation-rule>
<from-view-id>/guess.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/response.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<!-- indo de response.xhtml para guess.xhtml -->
<navigation-rule>
<from-view-id>/response.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/guess.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
E meu log do tomcat esta assim:
10/08/2008 21:56:35 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:Template' did not find a matching property.
10/08/2008 21:56:35 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\AmbienteDesenvolvimento\JDK\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\AmbienteDesenvolvimento\JDK\JRE\bin\client;C:\AmbienteDesenvolvimento\JDK\JRE\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\AmbienteDesenvolvimento\JDK\bin;C:\AmbienteDesenvolvimento\Tools\apache-maven-2.0.9\bin;C:\AmbienteDesenvolvimento\SGBD\MYSQL_5.1\bin;C:\AmbienteDesenvolvimento\Server\web\apache-tomcat-6.0.16\bin;
10/08/2008 21:56:35 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
10/08/2008 21:56:35 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 658 ms
10/08/2008 21:56:35 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
10/08/2008 21:56:35 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
10/08/2008 21:56:36 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra (1.2_08-b06-FCS) for context '/Template'
10/08/2008 21:56:37 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
10/08/2008 21:56:37 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
10/08/2008 21:56:37 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/32 config=null
10/08/2008 21:56:37 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1959 ms
Porem quando acesso a pagina guess.jsf esta dando como :
HTTP Status 404 - /Template/guess.jsf
type Status report
message /Template/guess.jsf
description The requested resource (/Template/guess.jsf) is not available.
Apache Tomcat/6.0.18
Nao aparece erro algum. O que pode ser?
Estou seguindo o tuto do exemplo NumberGuess que vem com a distribuicao do facelet:
Obrigado