Erro: HTTP Status 404

3 respostas
kmunga
Bom, esta dando esse erro, aparentamente não consegue localizar a pagina, eis os meus codigos o index.xhtml
<?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:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
<h:head>

</h:head>
<h:body>
    <h:outputText value="Hello mundo" />
</h:body>
</html>
o 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_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>teste</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>
  <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>*.xhtml</url-pattern>
  </servlet-mapping>
</web-app>

alguma dica? Uso o eclipse Juno e o tomcat 7, em ambiente linux debian wheezy.

3 Respostas

pedruhenrik

apenas um teste:

<welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list>

funciona?

qual o diretorio da pagina indexxhtml ?

att

kmunga

pedruhenrik:
apenas um teste:

<welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list>

funciona?

qual o diretorio da pagina indexxhtml ?

att

Eu retirei essa linha e deu o mesmo erro, o index.xhtml esta no webcontent.

pedruhenrik

kmunga:
pedruhenrik:
apenas um teste:

<welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list>

funciona?

qual o diretorio da pagina indexxhtml ?

att

Eu retirei essa linha e deu o mesmo erro, o index.xhtml esta no webcontent.

retirou ou acrescentou a linha:

<welcome-file>index.xhtml</welcome-file>

…???

como esta o seu faces-config.xml ??

att,

Criado 11 de dezembro de 2012
Ultima resposta 12 de dez. de 2012
Respostas 3
Participantes 2