Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/371.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JSF a4j和x2B错误;战斧&x2B;myfaces:Resources框架未初始化,请检查web.xml以了解筛选器配置_Java_Jsf_Ajax4jsf_Myfaces_Tomahawk - Fatal编程技术网

Java JSF a4j和x2B错误;战斧&x2B;myfaces:Resources框架未初始化,请检查web.xml以了解筛选器配置

Java JSF a4j和x2B错误;战斧&x2B;myfaces:Resources框架未初始化,请检查web.xml以了解筛选器配置,java,jsf,ajax4jsf,myfaces,tomahawk,Java,Jsf,Ajax4jsf,Myfaces,Tomahawk,我试图在我的JSP中使用,但出现了以下我完全不理解的错误: Exception while calling encodeBegin on component : { Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /pages/clienteAM.jsp] [Class: javax.faces.component.html.HtmlForm,Id: clientesForm] [Cl

我试图在我的JSP中使用
,但出现了以下我完全不理解的错误:

Exception while calling encodeBegin on component : { Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /pages/clienteAM.jsp] [Class: javax.faces.component.html.HtmlForm,Id: clientesForm] [Class: javax.faces.component.html.HtmlDataTable,Id: cityList] [Class: javax.faces.component.UIColumn,Id: j_id88] [Class: javax.faces.component.html.HtmlDataTable,Id: telefonos] [Class: javax.faces.component.UIColumn,Id: j_id89] [Class: org.ajax4jsf.ajax.html.HtmlAjaxCommandLink,Id: j_id91] } Caused by: javax.faces.FacesException: Resources framework is not initialised, check web.xml for Filter configuration 摘自:

不同的方法存在一些问题 在web.xml文件中定义的过滤器 冲突。为了避免这些问题 RichFaces筛选器必须是第一个 在web.xml中的其他过滤器中 配置文件

尝试更改web.xml文件,使RichFaces过滤器(又称Ajax4Jsf)位于extensionsFilter之前。

取自:

不同的方法存在一些问题 在web.xml文件中定义的过滤器 冲突。为了避免这些问题 RichFaces筛选器必须是第一个 在web.xml中的其他过滤器中 配置文件

尝试更改web.xml文件,使RichFaces过滤器(又称Ajax4Jsf)位于extensionsFilter之前

<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <description>MyProject web.xml</description>

    <context-param>
        <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
        <param-value>true</param-value>
    </context-param>

    <!-- Configure tomahawk taglib -->
    <context-param>
        <param-name>facelets.LIBRARIES</param-name>
        <param-value>/WEB-INF/tomahawk.taglib.xml</param-value>
    </context-param>

    <!-- Use Documents Saved as *.xhtml -->
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.jsp</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.BUILD_BEFORE_RESTORE</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <description>
            Validate managed beans, navigation rules and ensure that
            forms are not nested.
        </description>
        <param-name>org.apache.myfaces.VALIDATE</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <description>
            Treat readonly same as if disabled attribute was set for
            select elements.
        </description>
        <param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
        <param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value>
    </context-param>

    <context-param>
        <description>
            Virtual path in the URL which triggers loading of resources
            for the MyFaces extended components in the ExtensionFilter.
        </description>
        <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
        <param-value>/faces/myFacesExtensionResource</param-value>
    </context-param>

    <context-param>
        <description>
            Check if the extensions-filter has been properly configured.
        </description>
        <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
        <param-value>true</param-value>
    </context-param>


    <!-- Extensions Filter -->
    <filter>
        <filter-name>extensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <description>
                Set the size limit for uploaded files. Format: 10 - 10
                bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
            </description>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>100m</param-value>
        </init-param>
        <init-param>
            <description>
                Set the threshold size - files below this limit are
                stored in memory, files above this limit are stored on
                disk.

                Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
            </description>
            <param-name>uploadThresholdSize</param-name>
            <param-value>100k</param-value>
        </init-param>
    </filter>
    <filter>
      <display-name>Ajax4jsf Filter</display-name>
      <filter-name>ajax4jsf</filter-name>
      <filter-class>org.ajax4jsf.Filter</filter-class>
      <init-param>
       <param-name>forceparser</param-name>
       <param-value>false</param-value>
      </init-param>
    </filter>
    <filter-mapping>
      <filter-name>ajax4jsf</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
      <dispatcher>REQUEST</dispatcher>
      <dispatcher>FORWARD</dispatcher>
      <dispatcher>INCLUDE</dispatcher>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <listener>
        <listener-class>
            org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>

    <!-- Faces Servlet -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

    <!-- Welcome files -->
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>
    <error-page>
        <exception-type>java.lang.Throwable</exception-type>
        <location>/index.jsp</location>
    </error-page>
</web-app>