JSF的长轮询(待处理请求)

编程入门 行业动态 更新时间:2024-10-24 16:25:01
本文介绍了JSF的长轮询(待处理请求)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要对聊天室实施长时间的轮询或待处理的请求.我尝试了a4j:push,但似乎不能像真正的长时间轮询方法那样工作(请参阅以下讨论: community.jboss/message/16614 ).

I need to implement long polling or pending request for a chatroom. I tried a4j:push, but it seems doesn't work like a real long polling approach (see the following discussion: community.jboss/message/16614).

问题是:我必须采用哪些替代方法来实现长时间轮询?

The question is: which alternatives do I have to realize long polling?

我正在使用JSF 1.2,JAVA EE 6和RichFaces 3.3.2.

I'm using JSF 1.2, JAVA EE 6 and RichFaces 3.3.2.

提前想好了!

推荐答案

您需要使用RichFaces中的a4j:poll组件. exadel现场演示有一个非常好的示例,并解释了主要属性.另外,您可以在官方文档.

You need to use the a4j:poll component from RichFaces. The exadel live demo has a very nice sample and explains the main properties. Plus, you can get more info in the official documentation.

也许您想看一个聊天实现示例而不是轮询.有一个问题:

Maybe you want to look at a chat implementation example and not polling. There is a question about it:

stackoverflow/a/1577486/1065197

更多推荐

JSF的长轮询(待处理请求)

本文发布于:2023-11-09 20:26:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573349.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:JSF   长轮询

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!