This content has been marked as final. Show 1 reply
The problem in your code is you haven't mentioned the server URL which is needed to subscribe.
dojox.cometd.init("cometd"); this is a wrong intitialization instead you have to use
dojox.cometd.init("http://localhost:9002/pubsub"); or something like this with an appropriate URL. In this URL /pubsub is context path and not the default channel you subscribe. This was the reason for your error (cometd init failed)
Please let me know if the problem get solved or still u have any queries regarding the same.