简体   繁体   English

JSF:等待派对,然后重定向

[英]JSF: Wait for party, then redirect

I'm using JSF 2.0 and Glassfish 3.1 and have the following problem:我正在使用 JSF 2.0 和 Glassfish 3.1 并遇到以下问题:

I've got an application in which two users must participate.我有一个必须有两个用户参与的应用程序。 The first user should set up the session and then get to a wait page.第一个用户应该设置 session 然后进入等待页面。 When the second user joins, the first one should be redirected to the application page.当第二个用户加入时,第一个用户应该被重定向到应用程序页面。 Is this possible in JSF, and if yes, how?这在 JSF 中是否可能,如果是,如何?

  • Create an Ajax polling mechanism创建 Ajax 轮询机制
  • Invoke an action from Ajax, check if condition met从 Ajax 调用一个动作,检查条件是否满足
  • If met using JavaScript code redirect the user (Or you can also make it redirect from action)如果遇到使用 JavaScript 代码重定向用户(或者您也可以使其从操作重定向)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM