升级到MyFaces 2.1.12时,JSF应用程序无法在浏览器上运行

时间:2013-07-02 14:23:27

标签: jsf jetty myfaces

我已将我的JSF应用程序从MyFaces 1.2.7升级到MyFaces 2.1.12。我在web.xml文件中设置了相关的依赖项,并在localhost中运行了应用程序。该应用程序编译没有任何错误,但当我想在浏览器上运行它没有出现在页面上。这个问题可能是什么原因?

这是web.xml内容:

<servlet>
    <servlet-name>log4j-init</servlet-name>
    <servlet-class>Log4jInit</servlet-class>
    <init-param>
    <param-name>log4j-init-file</param-name>
    <param-value>WEB-INF\log4j.lcf</param-value>
    </init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<context-param>
    <param-name>log4jConfigLocation</param-name>
    <param-value>WEB-INF/log4j.properties</param-value>
</context-param>
<welcome-file-list>
    <welcome-file>portal/html/index.xhtml</welcome-file>
</welcome-file-list>
<context-param>
    <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
    <param-value>false</param-value>
</context-param>
<!-- Special Debug Output for Development -->
<context-param>
    <param-name>facelets.DEVELOPMENT</param-name>
    <param-value>false</param-value>
</context-param>
<context-param>
    <param-name>facelets.REFRESH_PERIOD</param-name>
    <param-value>2</param-value>
</context-param>
<context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
</context-param>
<context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>true</param-value>
</context-param>
<context-param>
    <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
    <param-value>true</param-value>
</context-param>
<!-- Richfaces -->
<context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
</context-param>
<context-param>
    <param-name>org.richfaces.SKIN</param-name>
    <param-value>tracker</param-value>
</context-param>
<!-- Richfaces end -->
<context-param>
    <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
    <param-value>com.sun.facelets.FaceletViewHandler</param-value>
</context-param>
<listener>
    <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<listener>
    <listener-class>com.omega.src.util.InitializeListener</listener-class>
</listener>
<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>
<welcome-file-list>
    <welcome-file>loginPage.xhtml</welcome-file>
</welcome-file-list>
<login-config>
    <auth-method>BASIC</auth-method>
</login-config>

这是我的pom.xml内容:

<dependencies>
    <dependency>
        <groupId>org.apache.myfaces.core</groupId>
        <artifactId>myfaces-api</artifactId>
        <version>2.1.12</version>
    </dependency>
    <dependency>
        <groupId>org.apache.myfaces.core</groupId>
        <artifactId>myfaces-impl</artifactId>
        <version>2.1.12</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>2.5</version>
    </dependency>

    <dependency>
        <groupId>org.richfaces.core</groupId>
        <artifactId>richfaces-core-api</artifactId>
        <version>4.3.2.Final</version>
    </dependency>
    <dependency>
        <groupId>org.richfaces.core</groupId>
        <artifactId>richfaces-core-impl</artifactId>
        <version>4.3.2.Final</version>
    </dependency>
    <dependency>
        <groupId>org.richfaces.ui</groupId>
        <artifactId>richfaces-components-ui</artifactId>
        <version>4.3.2.Final</version>
    </dependency>
    <dependency>
        <groupId>org.richfaces.ui</groupId>
        <artifactId>richfaces-components-api</artifactId>
        <version>4.3.2.Final</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.16</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>3.6.8.Final</version>
    </dependency>
    <dependency>
        <groupId>postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.1-901.jdbc4</version>
    </dependency>
    <dependency>
        <groupId>javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.12.1.GA</version>
    </dependency>
    <dependency>
        <groupId>com.googlecode.gmaps4jsf</groupId>
        <artifactId>gmaps4jsf-core</artifactId>
        <version>1.1.4</version>
    </dependency>
    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
        <version>4.5.0</version>
    </dependency>
    <dependency>
        <groupId>net.sourceforge.jexcelapi</groupId>
        <artifactId>jxl</artifactId>
        <version>2.6.12</version>
    </dependency>
</dependencies>

0 个答案:

没有答案