JBoss 7.1.1 + JSF不会呈现页面

时间:2015-03-11 15:54:40

标签: jsf intellij-idea jboss jsf-2.2

我正在使用IntelliJ IDEA 14开发必须在JBoss 7.1.1下运行的JSF应用程序

JBoss deploys and starts correctly(running in IDE):

=========================================================================
[2015-03-11 09:44:31,277] Artifact bas_jsf:war exploded: Server is not connected. Deploy is not available.

Detected server admin port: 9999
  JBoss Bootstrap Environment

  JBOSS_HOME: /Users/Danil/IdeaProjects/jboss-as-7.1.1.Final

  JAVA: /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/java

  JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml

Detected server http port: 8080
=========================================================================

21:44:30,521 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA
21:44:31,582 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
21:44:31,671 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
21:44:33,068 INFO  [org.xnio] XNIO Version 3.0.3.GA
21:44:33,070 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
21:44:33,082 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
21:44:33,095 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
21:44:33,125 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
21:44:33,129 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
21:44:33,160 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
21:44:33,169 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
21:44:33,199 INFO  [org.jboss.as.connector] (MSC service thread 1-6) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
21:44:33,214 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
21:44:33,215 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
21:44:33,245 INFO  [org.jboss.as.naming] (MSC service thread 1-4) JBAS011802: Starting Naming Service
21:44:33,259 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
21:44:33,266 INFO  [org.jboss.as.security] (MSC service thread 1-3) JBAS013100: Current PicketBox version=4.0.7.Final
21:44:33,276 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-7) JBAS015400: Bound mail session [java:jboss/mail/Default]
21:44:33,305 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
21:44:33,481 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-4) JBoss Web Services - Stack CXF Server 4.0.2.GA
21:44:33,676 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-7) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
21:44:34,213 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
21:44:34,457 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) JBAS015012: Started FileSystemDeploymentService for directory /Users/Danil/IdeaProjects/jboss-as-7.1.1.Final/standalone/deployments
21:44:34,471 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /127.0.0.1:4447
21:44:34,472 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:9999
21:44:34,623 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
21:44:34,624 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 4696ms - Started 133 of 208 services (74 services are passive or on-demand)
Connected to server
[2015-03-11 09:44:35,152] Artifact bas_jsf:war exploded: Artifact is being deployed, please wait...
21:44:35,295 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "bas_jsf_war_exploded.war"
21:44:35,595 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-7) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/bas_jsf_war_exploded'
21:44:36,416 INFO  [org.hibernate.validator.util.Version] (MSC service thread 1-7) Hibernate Validator 4.2.0.Final
21:44:36,612 INFO  [org.jboss.web] (MSC service thread 1-7) JBAS018210: Registering web context: /bas_jsf_war_exploded
21:44:36,642 INFO  [org.jboss.as.server] (management-handler-thread - 2) JBAS018559: Deployed "bas_jsf_war_exploded.war"
[2015-03-11 09:44:36,677] Artifact bas_jsf:war exploded: Artifact is deployed successfully
[2015-03-11 09:44:36,678] Artifact bas_jsf:war exploded: Deploy took 1,526 milliseconds

但是在浏览器中打开的页面是空白的,因为它已经呈现:

<?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://xmlns.jcp.org/jsf/html" 
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets" 
      xmlns:f="http://xmlns.jcp.org/jsf/core">

   <f:view>
      <h:outputLabel value="Hello, world"></h:outputLabel>
   </f:view>
</html>

在项目设置库中,Mojarra-2.2.1作为编译范围。 在JBoss配置中包含JSF库jsf-api-1.2_15-jbossorg-2.jar

的web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee 
         http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
         version="3.1">
    <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>

0 个答案:

没有答案