迁移到Richfaces 4时出现问题

时间:2011-06-10 08:23:19

标签: tomcat richfaces

我严格遵循本文档中提到的所有要点,但是当我运行我的应用程序时, 它在Tomcat 6.0.29上运行时报告以下问题

(我在类路径中包含了Mozzara 2.0.4和jstl1.1)。

应用程序在Richfaces 3.3.3上完美运行

是JSf 2申请

  

严重:由于之前的错误,上下文[/ e360]启动失败   2011年6月10日下午1:48:05 com.sun.faces.config.ConfigureListener contextDestroyed   严重:尝试拆除Mojarra运行时时出现意外异常   显示java.lang.NullPointerException           在org.richfaces.application.CacheProvider.release(CacheProvider.java:86)           在org.richfaces.application.ServicesFactoryImpl.release(ServicesFactoryImpl.java:19)           在org.richfaces.application.ServiceTracker.release(ServiceTracker.java:100)           在org.richfaces.application.InitializationListener.onStop(InitializationListener.java:144)

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
            http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<filter>
    <display-name>RichFaces Filter</display-name>
    <filter-name>richfaces</filter-name>
    <filter-class>org.ajax4jsf.Filter</filter-class>
    <init-param>
        <param-name>createTempFiles</param-name>
        <param-value>false</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>richfaces</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>INCLUDE</dispatcher>
</filter-mapping>

<listener>
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<context-param>
    <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>
    <param-value>true</param-value>
</context-param>
<context-param>        
    <param-name>org.richfaces.SKIN</param-name>
    <param-value>#{ThemeBean.theme}</param-value>
</context-param>
<context-param>
    <param-name>org.richfaces.CONTROL_SKINNING</param-name>
    <param-value>enable</param-value>
</context-param>
<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>*.jsf</url-pattern>
</servlet-mapping>
<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>
<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>

1 个答案:

答案 0 :(得分:0)

您不再需要RichFaces 4中的过滤器配置。