JSF erro 404 [Resolvido]

Estou inciando no JSF, fiz uma aplicação de testes, porém ela dá erro 404.

esse é o log,

00:45:51,040 INFO [org.jboss.modules] (main) JBoss Modules version 1.5.2.Final
00:45:51,866 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
00:45:52,142 INFO [org.jboss.as] (MSC service thread 1-1) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
00:45:57,953 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found teste.war in deployment directory. To trigger deployment create a file called teste.war.dodeploy
00:45:58,037 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found testando-0.0.1-SNAPSHOT.war in deployment directory. To trigger deployment create a file called testando-0.0.1-SNAPSHOT.war.dodeploy
00:45:58,041 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found universo-0.0.1-SNAPSHOT.war in deployment directory. To trigger deployment create a file called universo-0.0.1-SNAPSHOT.war.dodeploy
00:45:58,269 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
00:45:58,323 INFO [org.xnio] (MSC service thread 1-3) XNIO version 3.4.0.Final
00:45:58,342 INFO [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.4.0.Final
00:45:58,943 INFO [org.jboss.as.webservices] (ServerService Thread Pool – 56) WFLYWS0002: Activating WebServices Extension
00:45:58,965 WARN [org.jboss.as.txn] (ServerService Thread Pool – 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
00:45:59,008 INFO [org.wildfly.extension.io] (ServerService Thread Pool – 37) WFLYIO001: Worker ‘default’ has auto-configured to 4 core threads with 32 task threads based on your 2 available processors
00:45:59,019 INFO [org.jboss.as.security] (ServerService Thread Pool – 53) WFLYSEC0002: Activating Security Subsystem
00:45:59,134 INFO [org.jboss.as.jsf] (ServerService Thread Pool – 44) WFLYJSF0007: Activated the following JSF Implementations: [main]
00:45:59,131 INFO [org.jboss.as.naming] (ServerService Thread Pool – 46) WFLYNAM0001: Activating Naming Subsystem
00:45:59,140 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool – 38) WFLYCLINF0001: Activating Infinispan subsystem.
00:45:59,577 INFO [org.jboss.as.security] (MSC service thread 1-2) WFLYSEC0001: Current PicketBox version=4.9.6.Final
00:45:59,722 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0003: Undertow 1.4.0.Final starting
00:46:00,000 INFO [org.jboss.as.connector] (MSC service thread 1-4) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.4.Final)
00:46:01,075 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool – 33) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
00:46:02,050 INFO [org.jboss.as.naming] (MSC service thread 1-3) WFLYNAM0003: Starting Naming Service
00:46:02,099 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 4.0.21.Final
00:46:02,097 INFO [org.jboss.as.mail.extension] (MSC service thread 1-2) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
00:46:02,129 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = h2
00:46:02,168 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool – 55) WFLYUT0014: Creating file handler for path ‘C:\JavaWeb\wildfly-10.1.0.Final/welcome-content’ with options [directory-listing: ‘false’, follow-symlink: ‘false’, case-sensitive: ‘true’, safe-symlink-paths: ‘[]’]
00:46:02,348 INFO [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 32 (per class), which is derived from thread worker pool sizing.
00:46:02,350 INFO [org.jboss.as.ejb3] (MSC service thread 1-3) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 8 (per class), which is derived from the number of CPUs on this host.
00:46:03,176 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0012: Started server default-server.
00:46:03,216 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0018: Host default-host starting
00:46:03,864 INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
00:46:04,426 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of “universo-0.0.1-SNAPSHOT.war” (runtime-name: “universo-0.0.1-SNAPSHOT.war”)
00:46:04,437 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0027: Starting deployment of “testando-0.0.1-SNAPSHOT.war” (runtime-name: “testando-0.0.1-SNAPSHOT.war”)
00:46:04,398 WARN [org.jboss.as.domain.management.security] (MSC service thread 1-2) WFLYDM0111: Keystore C:\JavaWeb\wildfly-10.1.0.Final\standalone\configuration\application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
00:46:04,449 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of “teste.war” (runtime-name: “teste.war”)
00:46:04,502 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-3) WFLYDS0013: Started FileSystemDeploymentService for directory C:\JavaWeb\wildfly-10.1.0.Final\standalone\deployments
00:46:07,158 INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-3) ISPN000128: Infinispan version: Infinispan ‘Chakra’ 8.2.4.Final
00:46:07,748 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
00:46:07,880 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 62) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
00:46:07,886 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 62) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
00:46:08,149 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 65) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
00:46:08,163 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 65) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
00:46:08,164 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 63) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
00:46:08,168 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool – 63) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
00:46:09,723 INFO [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
00:46:10,275 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6)
00:46:11,363 INFO [org.jboss.weld.deployer] (MSC service thread 1-3) WFLYWELD0003: Processing weld deployment universo-0.0.1-SNAPSHOT.war
00:46:11,673 INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-3) HV000001: Hibernate Validator 5.2.4.Final
00:46:13,490 INFO [org.jboss.weld.Version] (MSC service thread 1-3) WELD-000900: 2.3.5 (Final)
00:46:14,257 WARN [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0013: Deployment deployment “testando-0.0.1-SNAPSHOT.war” contains CDI annotations but no bean archive was not found. (No beans.xml nor class with bean defining annotations)
00:46:16,795 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool – 75) Inicializando Mojarra 2.2.13.SP1 20160303-1204 para o contexto '/testando-0.0.1-SNAPSHOT’
00:46:16,973 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool – 60) WFLYUT0021: Registered web context: /teste
00:46:21,657 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool – 75) Running on PrimeFaces 6.1
00:46:21,661 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool – 75) WFLYUT0021: Registered web context: /testando-0.0.1-SNAPSHOT
00:46:22,093 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool – 68) Inicializando Mojarra 2.2.13.SP1 20160303-1204 para o contexto '/universo-0.0.1-SNAPSHOT’
00:46:25,646 INFO [org.primefaces.webapp.PostConstructApplicationEventListener] (ServerService Thread Pool – 68) Running on PrimeFaces 6.1
00:46:25,655 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool – 68) WFLYUT0021: Registered web context: /universo-0.0.1-SNAPSHOT
00:46:25,790 INFO [org.jboss.as.server] (ServerService Thread Pool – 34) WFLYSRV0010: Deployed “universo-0.0.1-SNAPSHOT.war” (runtime-name : “universo-0.0.1-SNAPSHOT.war”)
00:46:25,791 INFO [org.jboss.as.server] (ServerService Thread Pool – 34) WFLYSRV0010: Deployed “teste.war” (runtime-name : “teste.war”)
00:46:25,792 INFO [org.jboss.as.server] (ServerService Thread Pool – 34) WFLYSRV0010: Deployed “testando-0.0.1-SNAPSHOT.war” (runtime-name : “testando-0.0.1-SNAPSHOT.war”)
00:46:26,369 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9903/management
00:46:26,370 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9903
00:46:26,370 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 36193ms - Started 1016 of 1276 services (426 services are lazy, passive or on-demand)

Aparentemente sua aplicação iniciou sem erros. Posta seu web.xml com o mapeamento do JSF, por favor.

Esse é o mapeamento.

<?xml version="1.0" encoding="UTF-8"?> testando index.xhtml Faces Servlet javax.faces.webapp.FacesServlet 1 Faces Servlet *.xhtml

Como faço para postar formatado como código fonte?

Dé 4 espaços e cole o código.

<?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" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
  <display-name>testando</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>*.xhtml</url-pattern>
  </servlet-mapping>
</web-app>

Agora sim, Obrigado @Gabriel_Cardoso1.

O mapeamento está ok. Agora poste a URL que apresenta erro 404 e a estrutura de diretórios do seu projeto, até chegar no arquivo xhtml, por favor.

:+1:

localhost:8080/testando/index.xhtml

A pasta WEB-INF não é um diretório de acesso público, ou seja, somente recursos internos podem acessar os dados deste diretório. Como seu index.xhtml está dentro do WEB-INF, seu acesso fica restrito. Coloque o index.xhtml na raiz da pasta webapp. Desta forma vc conseguirá acessar a URL informada.

Para que o index.xhtml utilize recursos da pasta WEB-INF, vc pode usar Facelets para trabalhar com compositions.

Mas está na pasta webapp, abri a pasta WEB-INF apenas para você ver onde estar o web.xml.

Foi mal…deu a impressão que estava no mesmo nível da WEB-INF.
Pode postar o seu pom.xml, por favor?

Relendo seu log de deploy, vi que seu artefato entrou como testando-0.0.1-SNAPSHOT.war no servidor.
Tente acessar localhost:8080/testando-0.0.1-SNAPSHOT/index.xhtml

Deu certo, muito obrigado.

Se quiser alterar o nome do artefato, acrescente a tag dentro do do maven. Se puder marcar a resposta como solução tb, agradeço.
Abraço.

Dentro do maven? onde exatamento?

No seu pom.xml, acrescente:

<build>
        <finalName>testando</finalName>
</build>