Simple comet app "org undefined"

I am trying to update an old cometd javascript wrapper and a test client (was 1.3.x) that I should use for the new comet 2.5.1 javascript. I have all the dependencies and the browser can find them, but I get errors in the Firebug console (see below) Multiple errors about "org"

The head of my HTML looks like this:

<head>
    <title>CometD Tester</title>
    <link rel="stylesheet" type="text/css"href="style/style.css" />
    <script type="text/javascript" src="org/cometd/Cometd.js"></script>
    <script type="text/javascript" src="org/cometd/AckExtension.js"></script>
    <script type="text/javascript" src="org/cometd/ReloadExtension.js"></script>
    <script type="text/javascript" src="jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript" src="jquery/jquery.cookie.js"></script>
    <script type="text/javascript" src="jquery/jquery.cometd.js"></script>
    <script type="text/javascript" src="jquery/jquery.cometd-reload.js"></script>
    <script type="text/javascript" src="js/myCometd.js"></script>
</head>

All of them are in the browser. Looking at Cometd.js, I see the following:

org.cometd.Cometd = function(name)
{
 ....
}

So this is not a definition of org? Please note that none of the errors in the Console are from Cometd.js. Otherwise, I do not see another definition of "org.cometd". I would really appreciate if anyone could help me. I am using Tomcat 7, and below is the dir structure:

Layout of the directories for the client app

Thank.

UPDATE - Further testing

I shortened the title to:

<head>
    <title>CometD Tester</title>
    <link rel="stylesheet" type="text/css"href="style/style.css" />
    <script type="text/javascript" src="org/cometd/Cometd.js"></script>
</head>

JS index.html. JS, , - Cometd.js comet.org. - ... script:

org.cometd.Cometd = function(name)

, .

EDIT - jquery.cometd-reload.js . , " " cometd, jquery one (?). JS, ( ++-).

(function($)
{
    function bind(org_cometd, cookie, ReloadExtension, cometd)
    {
        // Remap cometd COOKIE functions to jquery cookie functions
        // Avoid to set to undefined if the jquery cookie plugin is not present
        if (cookie)
        {
            org_cometd.COOKIE.set = cookie;
            org_cometd.COOKIE.get = cookie;
        }

        var result = new ReloadExtension();
        cometd.registerExtension('reload', result);
        return result;
    }

    if (typeof define === 'function' && define.amd)
    {
        define(['org/cometd', 'jquery.cookie', 'org/cometd/ReloadExtension', 'jquery.cometd'], bind);
    }
    else
    {
        bind(org.cometd, $.cookie, org.cometd.ReloadExtension, $.cometd);
    }
})(jQuery);
+5
2

, , Comet.org. , -maven-. , , , , . , ...

  • org cometd-javascript-common-2.5.1.war ( \cometd-2.5.1\cometd-javascript\jquery\target) cometd-javascript-jquery-2.5.1.war ( \cometd-2.5.1\cometd-javascript\common\target)
  • jquery cometd-javascript-jquery-2.5.1.war

org org/cometd.js, , , org/cometd/Cometd.js. org comet , 17 :

// Namespaces for the cometd implementation
this.org = this.org || {};
org.cometd = {};

org.cometd.JSON = {};

.

+5

jQuery JavaScript -

<head>
    <title>CometD Tester</title>
    <link rel="stylesheet" type="text/css"href="style/style.css" />
    <script type="text/javascript" src="jquery/jquery-1.9.0.js"></script> <!-- load first -->
    <script type="text/javascript" src="org/cometd/Cometd.js"></script>
    <script type="text/javascript" src="org/cometd/AckExtension.js"></script>
    <script type="text/javascript" src="org/cometd/ReloadExtension.js"></script>
    <script type="text/javascript" src="jquery/jquery.cookie.js"></script>
    <script type="text/javascript" src="jquery/jquery.cometd.js"></script>
    <script type="text/javascript" src="jquery/jquery.cometd-reload.js"></script>
    <script type="text/javascript" src="js/myCometd.js"></script>
</head>
+3

All Articles