[英]What a right way to build comet application, using Java Servlets 2 on IBM Websphere AppServer
I prefer long polling, but my implementation has some problems. 我更喜欢长时间轮询,但是我的实现存在一些问题。 I send ajax request to servlet, that run infinity loop: 我向运行无限循环的servlet发送ajax请求:
do {
// some process
} while (/* some process is not finished */);
You'll need the Web messaging service . 您将需要Web消息服务 。 There is a lot to configure so it doesn't make sense to write all in an answer. 有很多需要配置的内容,因此没有必要将所有内容都写在答案中。 Here is a tutorial 这是一个教程
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.