簡體   English   中英

Websphere 8 集群和 JSF2 問題

[英]Websphere 8 cluster and JSF2 issue

我目前正在 Websphere 8.0 上使用 JSF 進行編程,遇到了一個問題,我認為這是因為我們的集群。 我們有兩個節點,其中一個節點停機一段時間后,我的問題沒有發生。

我的問題是我在通過 commandButton 提交后以 javax.faces.application.ViewExpiredException 結束。

在此之前的堆棧跟蹤中,我還發現了這一點:

View State cannot be reconstructed
javax.faces.FacesException: javax.faces.application.ViewExpiredException
    at org.apache.myfaces.shared_impl.util.StateUtils.decrypt(StateUtils.java:496)
    at org.apache.myfaces.shared_impl.util.StateUtils.reconstruct(StateUtils.java:378)

所以我猜想兩個節點之間的處理有問題。

在我的 web.xml 中,我設置了:

<distributable />

<env-entry>
        <env-entry-name>jsf/ClientSideSecretKey</env-entry-name>
        <env-entry-type>java.lang.String</env-entry-type>
        <env-entry-value>SRe1FY2HKwBTOtT5KrtmiSoOzws+NA9/yX191wMFn9o=</env-entry-value>
    </env-entry> 

就像其他線程中提到的其他一些一樣,但我的問題仍然存在。

在 Websphere 中可能需要進行一些配置嗎?

這指向一個加密問題。 WebSphere 8.0 使用 MyFaces JSF 2.0 實現——您可能需要通過 MyFaces 上下文參數為每個節點配置共享機密。 至少,您需要設置 org.apache.myfaces.SECRET 參數:

<!-- Defines the secret (Base64 encoded) used to initialize the secret key
     for encryption algorithm. The size of it depends on the algorithm used for encryption -->
<context-param>
    <param-name>org.apache.myfaces.SECRET</param-name>
    <param-value>MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIz</param-value>
</context-param>

此處為 MyFaces 安全參數的說明。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM