Hi there
Using CometD 2.4.3 in a JSF web application with jQuery on the client side, I have the exception mentioned in the title when invoking this JS code:
$.cometd.subscribe('/price', function(message) { alert(message)});
The JS code is fired from the server through JSF servlet, after the page is loaded and running.
The JS code that is already loaded in the web page looks like this (inspired from the primer):
(function($)
{
var cometd = $.cometd;
$(document).ready(function()
{
....
// Disconnect when the page unloads
$(window).unload(function()
{
cometd.disconnect(true);
});
cometd.configure({
url: contextPath + "cometd",
logLevel: "debug"
});
cometd.addListener('/meta/handshake', _metaHandshake);
cometd.addListener('/meta/connect', _metaConnect);
});
})(jQuery);
No other relevant JS messages are given.
I am quite new to jQuery / JS, so I am not sure if this information is not enough. In case, please let me know.