Galera seguinte sou iniciante com desenvolvimento Java, apesar de já trabalhar em um sistema a mais de 2 anos… Isso pelo fato que toda a estrutura já estava montado, frameworks todos configurados, a unica coisa que eu precisava fazer era seguir o padrão e desenvolver, agora que com mais tempo estou tentando aprender a configurar e montar uma aplicação do zero, por motivos de direcionamento do próprio serviço estou estudando conf. do Facelets, estava seguindo a documentação da prórpia sun (https://facelets.dev.java.net/nonav/docs/dev/docbook.html) para configurar meu projeto, mas estou com um problema que eu não sei nem como procurar a solução no google, pois a a aplicação roda não aparece erro no console, contudo a minha página não é renderizada corretamente os componentes não é intepretado pelo meu FaceletViewHandler, porque a minha pagina final rodada no browser aparece assim:
(Código fonte tirado após renderização pelo browser)
(index.xhtml)
<!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:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html">
<body>
<ui:composition template="template.xhtml">
<ui:define name="title">
I'm thinking of a number from #{NumberBean.min} to #{NumberBean.max}. Can you guess it?
</ui:define>
<ui:define name="body">
<h:form id="helloForm">
<h:inputText type="text" id="userNo" value="#{NumberBean.guess}" validator="#{NumberBean.validate}"/>
<br/>
<h:commandButton type="submit" id="submit" action="success" value="Submit" />
<br/>
<h:message showSummary="true" showDetail="false" style="color: red; font-weight: bold;" id="errors1" for="userNo"/>
</h:form>
</ui:define>
</ui:composition>
</body>
</html>
(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>pas</display-name>
<welcome-file-list>
<welcome-file>index.xhtml</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>*.faces</url-pattern>
</servlet-mapping>
<!-- Optional JSF-RI Parameters to Help Debug -->
<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>
<!-- Optional JSF-RI Parameters to Help Debug -->
<!-- Config Facelets -->
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<!-- Special Debug Output for Development -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
<param-value>true</param-value>
</context-param>
<!-- Config Facelets -->
</web-app>
(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">
<!-- Config Facelets -->
<application>
<view-handler>
com.sun.facelets.FaceletViewHandler
</view-handler>
</application>
<!-- Config Facelets -->
<!-- our NumberBean we created before -->
<managed-bean>
<managed-bean-name>NumberBean</managed-bean-name>
<managed-bean-class>br.com.pas.action.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>
<!-- going from guess.xhtml to response.xhtml -->
<navigation-rule>
<from-view-id>/index.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/response.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
<!-- going from response.xhtml to guess.xhtml -->
<navigation-rule>
<from-view-id>/response.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/index.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
(Mensagens do console ao ser startado)
31/08/2009 16:31:38 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:pas' did not find a matching property.
31/08/2009 16:31:38 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:\Arquivos de programas\Java\jre1.6.0_06\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Arquivos de programas/Java/jre1.6.0_06/bin/client;C:/Arquivos de programas/Java/jre1.6.0_06/bin;C:\Arquivos de programas\Autodesk\Maya8.5\bin;C:\Arquivos de programas\Borland\Delphi7\Bin;C:\Arquivos de programas\Borland\Delphi7\Projects\Bpl\;c:\OraClient10g\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\TortoiseSVN\bin;D:\maven\bin;D:\Bruno\Panda3D\Engine\python;D:\Bruno\Panda3D\Engine\bin;C:\Arquivos de programas\Arquivos comuns\Ulead Systems\MPEG;C:\Arquivos de programas\Arquivos comuns\DivX Shared\
31/08/2009 16:31:38 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
31/08/2009 16:31:38 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 597 ms
31/08/2009 16:31:38 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
31/08/2009 16:31:38 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
31/08/2009 16:31:38 com.sun.faces.config.ConfigureListener contextInitialized
INFO: Initializing Mojarra (1.2_13-b01-FCS) for context '/pas'
31/08/2009 16:31:39 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
31/08/2009 16:31:39 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
31/08/2009 16:31:39 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
31/08/2009 16:31:39 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1364 ms
Os jar eu coloquei dentro da pasta lib
commons-beanutils-1.8.0.jar
commons-collections-3.2.1.jar
commons-digester-2.0.jar
commons-logging-1.1.1.jar
el-ri-1.0.jar
jsf-api.jar
jsf-facelets.jar
jsf-impl.jar
jstl-api-1.2.jar
O jar el-api-1.1.jar eu removi da pasta lib do meu projeto, pois, estou usando Tomcat 6 e nele já vem essa biblioteca. Antes quanto eu tinha esse jar tb na pasta lib do meu projeto o tomcat startava com um erro pesquisando na internet o pessoal falou que era pq esse jar já tem dentro do tomcat.
Estou usando:
Eclipse JEE Galileo (Build 20090621-0832)
Tomcat 6.0.20
JRE1.6.0_06
JSF Sun RI 1.2
Se alguem puder ajudar agradeço!