tags:

views:

620

answers:

3

Hi all,

I currently develop with DWR 2, but I now want to try DWR 3. I don't understand how is possible to make comet with DWR 3. I've searched on Google many many times but I've not found any good examples. Could anyone help me?

Thanks, Tom

+1  A: 

You need to configure DWR to enable Reverse AJAX. To start the Comet cycle, you need to request Reverse AJAX on page load: dwr.engine.setActiveReverseAjax(true);. To enable full streaming, set the init-param: maxWaitAfterWrite to -1. If full streaming is not what you want, you can set that to whatever poll rate you want (default is 5s). Comet can be hard on the server, so be careful.

geowa4
A: 

ok, thats is a preconfiguration for enable reverse ajax. I load a class java for dwr, and after that, for example, how i can send to browser a message?

A: 

i think you can search baidu or www.javaeye.com there are many examples about revers dwr;

sjl