升级到MyFaces 2.1.9后,<h:commandlink>操作无效

时间:2015-05-20 07:09:40

标签: jsf-2 myfaces commandlink

我们的团队正在将Web应用程序从Myfaces-1.1.5升级到Myfaces-2.1.9,从Tomahawk-1.1.3升级到Tomahawk-1.1.14。 在升级之前我们使用ajax4jsf-1.0.6,升级后我们使用richfaces-impl-jsf2-3.3.4。 问题是我们无法在.xhtml文件中使用以下h:commandLink(with action as outboundProfileForm)呈现下一页。当我们单击此commandLink而不是下一页时,将再次呈现当前页面。日志中没有例外。您能否指导我们或指导如何向前发展。非常感谢提前。

    <h:column>
            <f:facet name="header">
                <h:panelGroup>
                    <h:commandLink action="#{outboundProfileList.sortTable}"
                        value="#{text['outboundProfileLabel.name']}">
                        <f:param name="sortColumn" value="name" />
                    </h:commandLink>
                    <h:graphicImage value="#{outboundProfileList.model.sortAscending ? '/images/arrowUp.GIF' : '/images/arrowDown.GIF'}"
                            rendered="#{outboundProfileList.model.sortColumn=='name'}" />
                </h:panelGroup>
            </f:facet>
            <h:commandLink action="#{outboundProfileForm.edit}"
                value="#{outboundProfile.name}">
                <f:param name="passedId" value="#{outboundProfile.id}" />
                <f:param name="from" value="list" />
            </h:commandLink>
        </h:column>

Web.xml如下:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 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_3_0.xsd">

    <display-name>e-Messaging</display-name>
    <distributable/>

    <!-- precompiled jsp mappings -->

    <!-- Define the default CSS Theme -->
    <context-param>
        <param-name>csstheme</param-name>
        <param-value>group1</param-value>
    </context-param>
    <!-- Define the basename for a resource bundle for I18N -->
    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
        <param-value>ApplicationResources</param-value>
    </context-param>
    <!-- Fallback locale if no bundles found for browser's preferred locale -->
    <!-- Force a single locale using param-name 'javax.servlet.jsp.jstl.fmt.locale' -->
    <context-param>
        <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name>
        <param-value>en</param-value>
    </context-param>
    <!-- Context Configuration locations for Spring XML files -->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
            classpath*:/applicationContext-resources.xml
            classpath*:/applicationContext-dao.xml
            classpath*:/applicationContext-service.xml
            classpath*:/applicationContext-monitoring.xml
            classpath*:/applicationContext-inbound.xml
            classpath*:/applicationContext-config.xml
            classpath*:/applicationContext-outbound.xml
            classpath*:/applicationContext.xml
            /WEB-INF/security.xml
            /WEB-INF/applicationContext.xml
            /WEB-INF/cxf.xml
            classpath*:/applicationContext-agent.xml
            classpath*:/applicationContext-ext.xml
        </param-value>
    </context-param>
    <context-param>  
     <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>  
     <param-value>true</param-value>  
</context-param> 
    <context-param>
        <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
        <!--<param-value>org.ajax4jsf.application.</param-value> -->
        <!--<param-value>org.apache.myfaces.view.facelets.FaceletViewHandler</param-value> -->  
        <param-value>com.g1.emessaging.ui.EmsgFaceletViewHandler</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.ALLOW_JAVASCRIPT</param-name>
        <param-value>false</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>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Production</param-value>
    </context-param>
    <context-param>
        <param-name>faces.PROJECT_STAGE</param-name>
        <param-value>Production</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.xhtml</param-value>
    </context-param>
    <context-param>
        <param-name>facelets.VIEW_MAPPINGS</param-name>
        <param-value>*.xhtml</param-value>
    </context-param> 
    <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>facelets.REFRESH_PERIOD</param-name>
        <param-value>-1</param-value>
    </context-param>
    <context-param>  
        <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>  
        <param-value>a4j_resource</param-value>  
    </context-param>  
    <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>blueSky</param-value>
    </context-param>

    <context-param>
      <param-name>org.richfaces.CONTROL_SKINNING</param-name>
      <param-value>disable</param-value>
    </context-param>
        <context-param>
      <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
      <param-value>disable</param-value>
    </context-param>


    <context-param>
        <param-name>facelets.LIBRARIES</param-name>
        <param-value>
<!--            /WEB-INF/taglibs/corejsf-validator.taglib.xml; -->
            /WEB-INF/taglibs/tomahawk.taglib.xml;
            /WEB-INF/taglibs/emessaging.taglib.xml;
    /WEB-INF/taglibs/jsf-core.taglib.xml;
    /WEB-INF/taglibs/jsf-html.taglib.xml;
    /WEB-INF/taglibs/jsf-ui.taglib.xml;
    /WEB-INF/taglibs/jstl-core.taglib.xml;
    /WEB-INF/taglibs/jstl-fn.taglib.xml
        </param-value>
    </context-param>
    <context-param>
        <param-name>configPath</param-name>
        <param-value>/WEB-INF/classes</param-value>
    </context-param>    
    <context-param>
        <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
        <param-value>false</param-value>
     </context-param>

     <filter>
        <filter-name>ajax4jsf</filter-name>
        <filter-class>org.ajax4jsf.Filter</filter-class>
    </filter>
 <!--   <filter>
        <filter-name>cacheFilter</filter-name>
        <filter-class>com.opensymphony.oscache.web.filter.CacheFilter</filter-class>
    </filter> -->
    <filter>
        <filter-name>clickstreamFilter</filter-name>
        <filter-class>com.opensymphony.clickstream.ClickstreamFilter</filter-class>
    </filter>
    <filter>
        <filter-name>encodingFilter</filter-name>
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
        <init-param>
            <param-name>forceEncoding</param-name>
            <param-value>true</param-value>
        </init-param>
    </filter>

    <filter>
        <filter-name>extensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    </filter>
    <filter>
        <filter-name>gzipFilter</filter-name>
        <filter-class>net.sf.ehcache.constructs.web.filter.GzipFilter</filter-class>
    </filter>
    <!-- Remove this filter if you're using iBATIS, use OpenEntityManagerInViewFilter if using JPA -->
    <filter>
        <filter-name>lazyLoadingFilter</filter-name>
        <filter-class>org.springframework.orm.hibernate4.support.OpenSessionInViewFilter</filter-class>
        <!--<filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>-->
    </filter>
    <!--
    <filter>
        <filter-name>localeFilter</filter-name>
        <filter-class>org.appfuse.webapp.filter.LocaleFilter</filter-class>
    </filter>
    -->
    <filter>
        <filter-name>messageFilter</filter-name>
        <filter-class>org.appfuse.webapp.filter.MessageFilter</filter-class>
    </filter>
    <filter>
        <filter-name>rewriteFilter</filter-name>
        <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
        <init-param>
            <param-name>logLevel</param-name>
            <param-value>log4j</param-value>
        </init-param>
    </filter>
   <!-- <filter>
        <filter-name>securityFilter</filter-name>
        <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
        <init-param>
            <param-name>targetClass</param-name>
            <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
        </init-param>
    </filter> -->
    <filter>
        <filter-name>securityFilterChain</filter-name>
        <filter-class>
            org.springframework.web.filter.DelegatingFilterProxy
        </filter-class>
    </filter>
    <filter>
        <filter-name>sitemesh</filter-name>
    <!--    <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> -->
    <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>

    </filter>
    <!-- JavaScriptDetector Filter -->
    <filter>
        <filter-name>javascriptDetector</filter-name>
        <filter-class>
            com.g1.emessaging.webapp.filter.JavaScriptDetectorFilter
        </filter-class>
    </filter>

    <filter-mapping>
        <filter-name>encodingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>javascriptDetector</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>securityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <servlet-name>faces</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    </filter-mapping>

    <filter-mapping>
        <filter-name>ajax4jsf</filter-name>
        <servlet-name>faces</servlet-name>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping> 
    <!-- Commented out for 2 reasons: 1) it's a pain when developing JSPs, and
                                      2) it causes the Signup webtest to fail -->
    <!--filter-mapping>
        <filter-name>cacheFilter</filter-name>
        <url-pattern>*.jsp</url-pattern>
    </filter-mapping-->
    <filter-mapping>
        <filter-name>lazyLoadingFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>clickstreamFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <!--
    <filter-mapping>
        <filter-name>localeFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    -->
    <filter-mapping>
        <filter-name>gzipFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>rewriteFilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    <filter-mapping>
        <filter-name>messageFilter</filter-name>
        <url-pattern>*.html</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
    </filter-mapping>

    <listener>
        <listener-class>com.opensymphony.clickstream.ClickstreamListener</listener-class>
    </listener>
<!--    <listener>
        <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener> -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <listener>
        <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
    </listener>
    <listener>
        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>
    <listener>
        <listener-class>com.g1.emessaging.webapp.listener.StartupListener</listener-class>
    </listener>

    <listener>
        <listener-class>com.g1.emessaging.webapp.listener.LicenseValidationListener</listener-class>
    </listener>


    <listener>
        <listener-class>org.appfuse.webapp.listener.UserCounterListener</listener-class>
    </listener>

    <listener>
        <listener-class>net.sf.navigator.menu.MenuContextListener</listener-class>
    </listener>
    <listener>
        <listener-class>com.g1.emessaging.webapp.action.SessionListener</listener-class>
    </listener>
    <servlet>
         <servlet-name>viewPart</servlet-name>
        <servlet-class>com.g1.emessaging.webapp.action.workflow.servlet.ViewPart</servlet-class>
    </servlet>
        <!--  <init-param>
       <param-name>javax.faces.LIFECYCLE_ID</param-name>
       <param-value>InterceptingLifecycle</param-value>
      </init-param> -->
    <servlet>
      <servlet-name>faces</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>
   <!--
    <servlet>
        <servlet-name>faces</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet> -->

    <servlet>
        <servlet-name>dwr-invoker</servlet-name>
        <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
        <init-param>
            <param-name>debug</param-name>
            <param-value>true</param-value>
        </init-param>
    </servlet>

    <servlet>
        <servlet-name>ReadReceiptServlet</servlet-name>
        <servlet-class>com.g1.emessaging.outbound.servlet.ReadReceiptServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>SmsServlet</servlet-name>
        <servlet-class>com.g1.emessaging.inbound.sms.SmsServlet</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>WorkflowItemProvider</servlet-name>
        <servlet-class>com.g1.emessaging.webapp.action.workflow.servlet.WorkflowItemProvider</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>OutMessageProvider</servlet-name>
        <servlet-class>com.g1.emessaging.webapp.action.workflow.servlet.OutMessageProvider</servlet-class>
    </servlet>
    <servlet>
        <servlet-name>FailoverServlet</servlet-name>
        <servlet-class>com.g1.emessaging.failover.servlet.FailoverServlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>CXFServlet</servlet-name>
        <servlet-class>
            org.apache.cxf.transport.servlet.CXFServlet
        </servlet-class>
        <load-on-startup>3</load-on-startup>
    </servlet>


    <servlet-mapping>
        <servlet-name>viewPart</servlet-name>
        <url-pattern>/pages/workflow/viewPart.html</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>faces</servlet-name>
        <url-pattern>*.html</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>dwr-invoker</servlet-name>
        <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>ReadReceiptServlet</servlet-name>
        <url-pattern>/receipt/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>SmsServlet</servlet-name>
        <url-pattern>/sms/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>WorkflowItemProvider</servlet-name>
        <url-pattern>/workflow/WorkflowItemProvider</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>OutMessageProvider</servlet-name>
        <url-pattern>/workflow/OutMessageProvider</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>FailoverServlet</servlet-name>
        <url-pattern>/failover/*</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>CXFServlet</servlet-name>
        <url-pattern>/resource/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>

    <security-constraint>
        <web-resource-collection>
            <web-resource-name>Protect XHTML Templates</web-resource-name>
            <url-pattern>*.xhtml</url-pattern>
        </web-resource-collection>
        <auth-constraint/>
   </security-constraint>

    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

    <error-page>
        <error-code>500</error-code>
        <location>/pages/error/genericException.jsp</location>
    </error-page>

    <error-page>
        <error-code>400</error-code>
        <location>/index.jsp</location>
    </error-page>

    <error-page>
        <error-code>403</error-code>
        <location>/PBBI403.jsp</location> <!-- SCR 69315 - get rid of appfuse picture-->
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/PBBI404.jsp</location> <!-- SCR 69315 - get rid of appfuse picture-->
    </error-page>

    <error-page>
        <exception-type>javax.servlet.ServletException</exception-type>
        <location>/pages/error/genericInvalidator.jsp</location>
    </error-page>

</web-app>

0 个答案:

没有答案