WildFly 10.x always getting HTTP error 403: forbidden

Lao Tse picture Lao Tse · Jan 11, 2017 · Viewed 7.3k times · Source

I am getting to know JSF and therefore I try to run a hello world xhtml site. Problem: When accessing the site in the browser I always get the HTTP error code 403: forbidden.

I am using eclipse neon and WildFly Server v10. I deploy by using the JBoss Tools plugin in eclipse. I always used the default configurations. The log of the server does not show any errors and the sites should be deployed correctly:

09:50:23,999 INFO  [org.jboss.ws.common.management] (MSC service thread 1-6) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6) 
09:50:24,297 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
09:50:24,299 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) WFLYJCA0005: Deploying non-JDBC-compliant driver class com.mysql.fabric.jdbc.FabricMySQLDriver (version 5.1)
09:50:24,315 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.40-bin.jar_com.mysql.jdbc.Driver_5_1
09:50:24,315 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = mysql-connector-java-5.1.40-bin.jar_com.mysql.fabric.jdbc.FabricMySQLDriver_5_1
09:50:24,318 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) WFLYJCA0001: Bound data source [java:jboss/datasources/university]
09:50:24,551 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 60) Mojarra 2.2.13.SP1 20160303-1204 für Kontext '/HelloWorldJSF' wird initialisiert.
09:50:24,551 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 65) Mojarra 2.2.13.SP1 20160303-1204 für Kontext '/HelloWorld' wird initialisiert.
09:50:25,034 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 60) WFLYUT0021: Registered web context: /HelloWorldJSF
09:50:25,034 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 65) WFLYUT0021: Registered web context: /HelloWorld
09:50:25,060 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "mysql-connector-java-5.1.40-bin.jar" (runtime-name : "mysql-connector-java-5.1.40-bin.jar")
09:50:25,061 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "HelloWorldJSF.war" (runtime-name : "HelloWorldJSF.war")
09:50:25,061 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "HelloWorld.war" (runtime-name : "HelloWorld.war")
09:50:25,159 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
09:50:25,160 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
09:50:25,160 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started in 3828ms - Started 521 of 783 services (424 services are lazy, passive or on-demand)

The sites are deployed to:

C:\wildfly-10.1.0.Final\standalone\deployments

I actually used two web projects. I created one myself and I took the other directly from a tutorial. The tutorial did not say anything about additional configuration. What do I miss?

Answer

lazyPanda picture lazyPanda · Jan 13, 2017

Make sure that the URL you are trying is one of these:

http://localhost:8080/JavaServerFaces/hello.jsf
http://localhost:8080/JavaServerFaces/hello.faces
http://localhost:8080/JavaServerFaces/hello.xhtml
http://localhost:8080/JavaServerFaces/faces/hello.jsf