【发布时间】:2017-05-26 00:01:19
【问题描述】:
我开始了解 JSF,因此我尝试运行一个 hello world xhtml 站点。问题:在浏览器中访问网站时,我总是收到 HTTP 错误代码 403:禁止。
我正在使用 eclipse neon 和 WildFly Server v10。我使用 Eclipse 中的 JBoss Tools 插件进行部署。我总是使用默认配置。服务器的日志没有显示任何错误,应该正确部署站点:
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)
网站部署到:
C:\wildfly-10.1.0.Final\standalone\deployments
我实际上使用了两个网络项目。我自己创建了一个,另一个直接从教程中获取。教程没有说任何关于额外配置的内容。我错过了什么?
【问题讨论】:
-
您要访问的 URL 是什么?
-
我打电话给localhost:8080/HelloWorldJSF 或localhost:8080/HelloWorld 也尝试过其他人,但后来我收到错误 404 - 未找到。
-
感谢您的帮助!欣赏它!但我只是重新安装了所有东西,现在它可以工作了。
标签: java eclipse jboss jsf-2.2 wildfly-10