HTTP Status 404 - /X9/template.jsf
type Status report
message /X9/template.jsf
description The requested resource (/X9/template.jsf) is not available.
Apache Tomcat/7.0.23
Alguem sabe o pq?
HTTP Status 404 - /X9/template.jsf
type Status report
message /X9/template.jsf
description The requested resource (/X9/template.jsf) is not available.
Apache Tomcat/7.0.23
Alguem sabe o pq?
Está aparecendo alguma outra mensagem de erro? Ou é só essa?
No seu web.xml você mapeou como?
Está aparecendo alguma outra mensagem de erro? Ou é só essa?No seu web.xml você mapeou como?
Meu web.xml ta assim?
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" 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">
<display-name>X9</display-name>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</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>
<context-param>
<param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jsp</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>
<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"?>
<web-app id="WebApp_ID" 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">
<display-name>X9</display-name>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</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>
<context-param>
<param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.jsp</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>
<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>
E fiz outro projeto em JSF 1.2 igual ao outro que migrei para o JSF 2.0 e o 2.0 não presta e o 1.2 presta.
Oq pode ser?
Obrigado!
Pq o seu faces-config está igual (ou com diversas) configurações iguais ao do web.xml?
Pq o seu faces-config está igual (ou com diversas) configurações iguais ao do web.xml?Foi mal copiei o web.xml 2 vezes... Ta aki o faces-config correto...:
<faces-config version="1.2" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
<managed-bean>
<managed-bean-name>alunoBean</managed-bean-name>
<managed-bean-class>br.com.x9.bean.AlunoBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>professorBean</managed-bean-name>
<managed-bean-class>br.com.x9.bean.ProfessorBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>diretorBean</managed-bean-name>
<managed-bean-class>br.com.x9.bean.DiretorBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>coordenadorBean</managed-bean-name>
<managed-bean-class>br.com.x9.bean.CoordenadorBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<navigation-rule>
<from-view-id>/cadastroAluno.jsp</from-view-id>
<navigation-case>
<from-action>#{alunoBean.persist}</from-action>
<from-outcome>sucesso</from-outcome>
<to-view-id>/cadastroAluno.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editar</from-outcome>
<to-view-id>/editarAluno.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-action>#{alunoBean.remove}</from-action>
<from-outcome>sucesso</from-outcome>
<to-view-id>/cadastroAluno.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/editarAluno.jsp</from-view-id>
<navigation-case>
<from-action>#{alunoBean.update}</from-action>
<from-outcome>sucesso</from-outcome>
<to-view-id>/cadastroAluno.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
</application>
</faces-config>
no JSF2.0 a maioria das coisas é feita por anotações sendo o uso do faces-config.xml restrito a quase nada, é melhor pesquisar direito ou nem migrar e axar outra solução.
OK
Valeu!
Só mais uma duvida se vc souberem… 
Agora sempre que eu criu um projeto JSF 1.2 a eclipse ja fica acusando erro… (Aquele ponto de interrogação dentro de um triangulo amarelo…)