Pagina JSF 2.0 não aparece nada

Olá,

estou tentando montar primeira pagina jsf 2.0 mais aparece a seguinte mensagem,
chamando a url abaixo :

http://localhost:8080/ProjetoJSF2/index.xhtml

Transferencia de arquivos


Pretende guardar este arquivoou localizar um programa online para abrir ?

Nome : index.xhtml

Tipo:tipo de arquivo desconhecido

de : localhost

localizar   guardar   cancelar


_______________________

<?xml version="1.0" encoding="UTF-8"?>
<!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:h=?http://java.sun.com/jsf/html?>

<h:head><title>JSF 2.0</title></h:head>

<h:body>

<h:form id=?form1″>

<h:outputText value=?Primeiro exemplo com JSF 2.0″ />

</h:form>

</h:body>

</html>

_____________
<?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_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>ProjetoJSF2</display-name>
  <welcome-file-list>
    <welcome-file>index.xhtml</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>
  <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>
    <description>State saving method: client or server (=default). See JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
  </context-param>
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
  </context-param>
  <listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
  </listener>
  
</web-app>

Das duas uma, tente acessar a página como http://localhost:8080/ProjetoJSF2/faces/index.xhtml ou modifique as suas configurações da seguinte maneira:

  <servlet-mapping>  
    <servlet-name>Faces Servlet</servlet-name>  
    <url-pattern>*.xhtml</url-pattern>  
  </servlet-mapping> 

Olá,

ao chamar a url http://localhost:8080/ProjetoJSF2/index.html

não aparece nada porque será ??? alguém ode me ajudar …abs

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;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_3_0.xsd" id="WebApp_ID" version="3.0"&gt;
  &lt;display-name&gt;ProjetoJSF2&lt;/display-name&gt;
  &lt;welcome-file-list&gt;
    
   &lt;welcome-file&gt;index.xhtml&lt;/welcome-file&gt;
      &lt;/welcome-file-list&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;*.xhtml&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;context-param&gt;
    &lt;description&gt;State saving method: client or server (=default). See JSF Specification 2.5.2&lt;/description&gt;
    &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
    &lt;param-value&gt;client&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;context-param&gt;
    &lt;param-name&gt;javax.servlet.jsp.jstl.fmt.localizationContext&lt;/param-name&gt;
    &lt;param-value&gt;resources.application&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;listener&gt;
    &lt;listener-class&gt;com.sun.faces.config.ConfigureListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  
&lt;/web-app&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"&gt;


&lt;h:outputText value=?Primeiro exemplo com JSF 2.0&#8243; /&gt;

&lt;ui:composition template=""&gt;
	&lt;ui:define name="header"&gt;
	    Add your header here or delete to use the default
	&lt;/ui:define&gt;
	&lt;ui:define name="content"&gt;
	    Add your content here or delete to use the default
	&lt;/ui:define&gt;
	&lt;ui:define name="footer"&gt;
	    Add your footer here or delete to use the default
	&lt;/ui:define&gt;
&lt;/ui:composition&gt;
&lt;/html&gt;

no browser tenta colocar .jsf com terminação do aquivo.

tenta tb tirar h:head e h:body e ve se funciona ai

paribe

Sei que o post é antigo rs

Mas você lembra como solucionou o seu problema?

to com o mesmo problema bizarro aqui rs

Olá,

era a página index.xhtml não estava em WebContent…

abs

A… tendi… vou ver aqui

obrigado amigo