【问题标题】:refresh a <ui:composition when j_security_check connection interrupted (http 408)当 j_security_check 连接中断时刷新 <ui:composition (http 408)
【发布时间】:2012-12-03 15:20:02
【问题描述】:

我有一个 “j_security_check 连接中断(http 代码 408)”,建议的解决方案是 &lt;meta http-equiv="refresh" content="#{session.maxInactiveInterval}"/&gt; by https://stackoverflow.com/a/2141274/1852036 但我的页面结构是一个 composition 使用template.xhtml 和一个 view.xhtml&lt;ui:composition:
my template.xhtml:

<html ...
<f:view ...
<h:body ...
 <ui:insert name="content">
...

我的 view.xhtml 刷新时session.maxInactiveInterval

<ui:composition ...
<ui:define name="content">
...

谁能帮我做这件事?我想刷新这个&lt;ui:composition 视图,我不能在template.xhtml 上使用&lt;meta http-equiv="refresh" content="#{session.maxInactiveInterval}"/&gt;,因为它被多个视图使用了

【问题讨论】:

    标签: session authentication jsf-2 primefaces j-security-check


    【解决方案1】:

    我使用 p:poll 解决了类似的问题。类似的东西

    <p:poll interval="#{session.maxInactiveInterval - 1}" process="@all"/> 
    

    【讨论】:

    • process="@all" 是什么意思?
    • @all 处理整个页面
    • 我总是将时间间隔设置为 -1,因为我遇到了会话在刷新完成之前超时并且没有按预期运行的问题。
    • 我的错。它应该在 } 内。现已更新。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2023-03-24
    • 2014-04-30
    • 1970-01-01
    • 2018-01-01
    • 1970-01-01
    • 2010-12-12
    • 1970-01-01
    相关资源
    最近更新 更多