1

在我的应用程序中,我使用 JSF。我想在会话到期时将用户重定向到错误页面。我尝试<redirect />在 faces-config 中使用标签和导航案例。它不能正常工作。它更改了 url,但没有为 ajax 请求加载页面。但是,如果我使用 HttpServletRespose 类的 sendRedirect 方法,它就可以正常工作。两者有什么区别?

这是 faces-config 文件中的代码,

 <navigation-rule>
    <navigation-case>
        <from-outcome>session_expired</from-outcome>
        <to-view-id>/pages/general/home.jsp</to-view-id>
        <redirect />
    </navigation-case>
</navigation-rule>

感谢您的快速回复。

4

0 回答 0