在ExternalContext.redirect()之后临时对话没有结束
我正在一个使用 Seam 和 JSF 的项目中工作。由于某种原因(不要问我,我不知道),我之前的人决定通过 FacesContext.getExternalContext().redirect() 将用户重定向到响应页面。我看到的问题是,某些页面在重定向到自身时,永远不会释放对话(conversationId 在 URL 中始终相同)。有人遇到过类似的问题吗?谢谢
I'm working in a project using Seam and JSF. For some reason (don't ask me, I don't know) the people before me decided to redirect the user to the response page through a FacesContext.getExternalContext().redirect(). The problem I'm seeing is that some pages, when redirected to themselves, never release the conversation (the conversationId is always the same in the URL). Has anyone had a similar problem? Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对话不会因重定向而结束。如果你想手动结束对话,你需要通过
Conversation#end()
。您还可以通过Conversation#endBeforeRedirect()
。还有更多方便的方法。A conversation is not ended by a redirect. If you want to end a conversation manually, you need to call it by
Conversation#end()
. You can also instruct it to end before a redirect byConversation#endBeforeRedirect()
. There are more convenience methods as well.