0

我在iceface 3.3何时面临一个问题session timeout

[1] 会话超时
[2] 用户进行活动。
[3] firebug 中的错误 - 来自服务器的空响应
[4] UI 永远挂起
[5] 用户按 F5
[6] 重定向到登录页面
[7] 用户输入凭据
[8] 重定向到 xml 错误页面

<partial-response>
 <error>
 <error-name>
 class org.icefaces.application.SessionExpiredException
 </error-name>
 <error-message>
 <![CDATA[ Session has expired ]]>
 </error-message>
 </error>
 <changes>
 <extension aceCallbackParam="validationFailed">{"validationFailed":false}</extension>
 </changes>
 </partial-response>

[9] 用户点击刷新 ..user 重定向到普通应用程序

这种用途可以正常工作1.8......我现在正在尝试使用它3.3 在调试期间我发现了 1.8 和 3.3 之间的一个主要区别

1.8会话超时并且用户执行活动时,对此请求的响应是以下形式:

response.status = 200 
response.reponseXML = <sessionTimeOut><sessionTimeOut/> 

3.3会话超时和用户进行活动时,响应是:

reponse.status = 302 with response.header.location = login page 
since status is 302 browser itself make a request for login page. 

它得到icefaces javascript code的响应看起来像

    response.status=200 
    reponse.responseXML=null 
response.reponseHTML=<HTML CODE OF LOGIN PAGE> 

如果为空,则在jsf.js响应处理程序中只记录一个错误。reponseXML

所以这就是icefaces 不重定向或显示弹出窗口的原因。

现在有人对此有修复或解决方法吗?

我在用icefaces 3.3, glassfish 3.1, spring 3.0.1

4

1 回答 1

0

对于icefaces 3.3,您需要在web.xml 中使用此上下文参数。观察以 com 开头的 icefaces 1.8 和以 org 开头的 icefaces 3.3 的参数名称的差异。

<context-param>
    <param-name>org.icefaces.sessionExpiredRedirectURI</param-name>
    <param-value>/myPath/theSessionExpiredPage.jsf</param-value>
</context-param>
于 2014-04-02T00:44:38.437 回答