当我提交jsf页面的表单并重定向到另一个页面时,就会发生这种情况
<p:outputPanel id="panelx" >
<form method="post" action="https://someUrl/payment/response" id="xForm" name="xForm">
<input name="id" type="hidden" id="id" size="50" maxlength="10"
value="#{somevalue}" />
<input type="submit" id="btnsubmit" value="submit" style="display: none" />
</form>
</p:outputPanel>
但是当我在jsp页面下方使用jsp页面及其中的相同表单时,我可以解决此问题
<body onload="document.paymentRedirect.submit()">
<form method="post" name="paymentRedirect" id="paymentRedirect" action="https://someUrl/payment/response">
<input id="id" name="id" class="x25" size="40" type="hidden"
value="<% out.print(request.getParameter("id"));%>">
</form>
</body>
java.lang.ClassCastException: java.util.HashMap cannot be cast to [[Ljava.lang.Object;
at javax.faces.component.UIComponentBase.restoreSystemEventListeners(UIComponentBase.java:1914)
at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1615)
at com.sun.faces.application.view.FaceletPartialStateManagementStrategy$2.visit(FaceletPartialStateManagementStrategy.java:379)
at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1689)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
at com.sun.faces.application.view.FaceletPartialStateManagementStrategy.restoreView(FaceletPartialStateManagementStrategy.java:366)
Blockquote