CometD publish a message back to a client
I am having a problem in sending back a message to a client. Below is my code JavaScript dojox.cometd.publish('/service/getservice', { userid : _USERID, }); dojox.cometd.subscribe('/service/getservice', function( message) { alert("abc"); alert(message.data.test); }); Configuration Servlet bayeux.createIfAbsent("/service/getservice", new ConfigurableServerChannel.Initializer() { @Override public void configureChannel(ConfigurableServerChannel channel) { channel.setPersistent(true); GetListener channelListner = new GetListener(); channel.addListener(channelListner); } }); GetListener class