You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@unomi.apache.org by sh...@apache.org on 2021/04/28 15:25:06 UTC

svn commit: r1889265 - in /unomi/website/manual: 1_1_x/index.html 1_2_x/index.html 1_3_x/index.html 1_4_x/index.html 1_5_x/index.html latest/index.html

Author: shuber
Date: Wed Apr 28 15:25:06 2021
New Revision: 1889265

URL: http://svn.apache.org/viewvc?rev=1889265&view=rev
Log:
Site checkin for project Apache Unomi :: Root Project

Modified:
    unomi/website/manual/1_1_x/index.html
    unomi/website/manual/1_2_x/index.html
    unomi/website/manual/1_3_x/index.html
    unomi/website/manual/1_4_x/index.html
    unomi/website/manual/1_5_x/index.html
    unomi/website/manual/latest/index.html

Modified: unomi/website/manual/1_1_x/index.html
URL: http://svn.apache.org/viewvc/unomi/website/manual/1_1_x/index.html?rev=1889265&r1=1889264&r2=1889265&view=diff
==============================================================================
--- unomi/website/manual/1_1_x/index.html (original)
+++ unomi/website/manual/1_1_x/index.html Wed Apr 28 15:25:06 2021
@@ -667,7 +667,7 @@ contains the URLs of all your cluster no
 </div>
 </div>
 <div class="paragraph">
-<p>This test page will trigger the loading of the /context.js script, which will try to retrieving the user context
+<p>This test page will trigger the loading of the /cxs/context.js script, which will try to retrieving the user context
 or create a new one if it doesn&#8217;t exist yet. It also contains an experimental integration with Facebook Login, but it
 doesn&#8217;t yet save the context back to the context server.</p>
 </div>
@@ -734,7 +734,7 @@ Initializing cluster service endpoint...
 </div>
 <div class="paragraph">
 <p>This indicates that all the Unomi services are started and ready to react to requests. You can then open a browser and go to <code><a href="http://localhost:8181/cxs" class="bare">http://localhost:8181/cxs</a></code> to see the list of
-available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/context.json" class="bare">http://localhost:8181/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
+available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/cxs/context.json" class="bare">http://localhost:8181/cxs/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
 </div>
 </div>
 <div class="sect4">
@@ -794,7 +794,7 @@ mvn clean install</code></pre>
 <div class="sect3">
 <h4 id="_retrieving_context_information_from_unomi_using_the_context_servlet">2.2.4. Retrieving context information from Unomi using the context servlet</h4>
 <div class="paragraph">
-<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
+<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/cxs/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
 </div>
 <div class="paragraph">
 <p>Below is an example of asynchronously loading the initial context using the javascript version, assuming a default Unomi install running on <code><a href="http://localhost:8181" class="bare">http://localhost:8181</a></code>:</p>
@@ -807,7 +807,7 @@ mvn clean install</code></pre>
     if (document.getElementById(id)) return;
     js = document.createElement(elementToCreate);
     js.id = id;
-    js.src = 'http://localhost:8181/context.js';
+    js.src = 'http://localhost:8181/cxs/context.js';
     fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'context'));</code></pre>
 </div>
@@ -867,7 +867,7 @@ information about the context for the cu
     var data = JSON.stringify(payload);
     // if we don't already have a session id, generate one
     var sessionId = cxs.sessionId || generateUUID();
-    var url = 'http://localhost:8181/context.json?sessionId=' + sessionId;
+    var url = 'http://localhost:8181/cxs/context.json?sessionId=' + sessionId;
     var xhr = new XMLHttpRequest();
     var isGet = data.length &lt; 100;
     if (isGet) {
@@ -921,7 +921,7 @@ information about the context for the cu
 <p>We need to either retrieve (from the initial context we retrieved previously using <code>cxs.sessionId</code>) or generate a session identifier for our request since Unomi currently requires one.</p>
 </li>
 <li>
-<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/context.json?sessionId=&#39" class="bare">http://localhost:8181/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
+<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/cxs/context.json?sessionId=&#39" class="bare">http://localhost:8181/cxs/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
 </li>
 <li>
 <p>We don&#8217;t need to provide any authentication at all to interact with this part of Unomi since we only have access to read-only data (as well as providing events as we shall see later on). If we had been using the REST API, we would have needed to provide authentication information as well.</p>
@@ -1400,10 +1400,10 @@ application-level firewall you should on
 <div class="ulist">
 <ul>
 <li>
-<p><a href="http://localhost:8181/context.js">http://localhost:8181/context.js</a></p>
+<p><a href="http://localhost:8181/cxs/context.js">http://localhost:8181/cxs/context.js</a></p>
 </li>
 <li>
-<p><a href="http://localhost:8181/eventcollector">http://localhost:8181/eventcollector</a></p>
+<p><a href="http://localhost:8181/cxs/eventcollector">http://localhost:8181/cxs/eventcollector</a></p>
 </li>
 </ul>
 </div>

Modified: unomi/website/manual/1_2_x/index.html
URL: http://svn.apache.org/viewvc/unomi/website/manual/1_2_x/index.html?rev=1889265&r1=1889264&r2=1889265&view=diff
==============================================================================
--- unomi/website/manual/1_2_x/index.html (original)
+++ unomi/website/manual/1_2_x/index.html Wed Apr 28 15:25:06 2021
@@ -783,7 +783,7 @@ contains the URLs of all your cluster no
 </div>
 </div>
 <div class="paragraph">
-<p>This test page will trigger the loading of the /context.js script, which will try to retrieving the user context
+<p>This test page will trigger the loading of the /cxs/context.js script, which will try to retrieving the user context
 or create a new one if it doesn&#8217;t exist yet. It also contains an experimental integration with Facebook Login, but it
 doesn&#8217;t yet save the context back to the context server.</p>
 </div>
@@ -850,7 +850,7 @@ Initializing cluster service endpoint...
 </div>
 <div class="paragraph">
 <p>This indicates that all the Unomi services are started and ready to react to requests. You can then open a browser and go to <code><a href="http://localhost:8181/cxs" class="bare">http://localhost:8181/cxs</a></code> to see the list of
-available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/context.json" class="bare">http://localhost:8181/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
+available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/cxs/context.json" class="bare">http://localhost:8181/cxs/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
 </div>
 </div>
 <div class="sect4">
@@ -862,7 +862,7 @@ available RESTful services or retrieve a
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.js?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.js?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -878,7 +878,7 @@ events using the cxs.collectEvents() fun
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 </div>
@@ -894,7 +894,7 @@ of the context.js(on) servlet.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"requiredProfileProperties":["*"],"requiredSessionProperties":["*"],"requireSegments":true}' http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"requiredProfileProperties":["*"],"requiredSessionProperties":["*"],"requireSegments":true}' http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -912,7 +912,7 @@ illustrated in the following example:</p
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"events":[{"eventType":"view","scope": "example","source":{"itemType": "site","scope":"example","itemId": "mysite"},"target":{"itemType":"page","scope":"example","itemId":"homepage","properties":{"pageInfo":{"referringURL":""}}}}]}' http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"events":[{"eventType":"view","scope": "example","source":{"itemType": "site","scope":"example","itemId": "mysite"},"target":{"itemType":"page","scope":"example","itemId":"homepage","properties":{"pageInfo":{"referringURL":""}}}}]}' http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -930,7 +930,7 @@ respond quickly and minimize network tra
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"events":[{"eventType":"view","scope": "example","source":{"itemType": "site","scope":"example","itemId": "mysite"},"target":{"itemType":"page","scope":"example","itemId":"homepage","properties":{"pageInfo":{"referringURL":""}}}}]}' http://localhost:8181/eventcollector?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"events":[{"eventType":"view","scope": "example","source":{"itemType": "site","scope":"example","itemId": "mysite"},"target":{"itemType":"page","scope":"example","itemId":"homepage","properties":{"pageInfo":{"referringURL":""}}}}]}' http://localhost:8181/cxs/eventcollector?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -1141,10 +1141,10 @@ application-level firewall you should on
 <div class="ulist">
 <ul>
 <li>
-<p><a href="http://localhost:8181/context.js">http://localhost:8181/context.js</a></p>
+<p><a href="http://localhost:8181/cxs/context.js">http://localhost:8181/cxs/context.js</a></p>
 </li>
 <li>
-<p><a href="http://localhost:8181/eventcollector">http://localhost:8181/eventcollector</a></p>
+<p><a href="http://localhost:8181/cxs/eventcollector">http://localhost:8181/cxs/eventcollector</a></p>
 </li>
 </ul>
 </div>
@@ -1536,7 +1536,7 @@ mvn clean install</code></pre>
 <div class="sect3">
 <h4 id="_retrieving_context_information_from_unomi_using_the_context_servlet">3.3.3. Retrieving context information from Unomi using the context servlet</h4>
 <div class="paragraph">
-<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
+<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/cxs/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
 </div>
 <div class="paragraph">
 <p>Below is an example of asynchronously loading the initial context using the javascript version, assuming a default Unomi install running on <code><a href="http://localhost:8181" class="bare">http://localhost:8181</a></code>:</p>
@@ -1549,7 +1549,7 @@ mvn clean install</code></pre>
     if (document.getElementById(id)) return;
     js = document.createElement(elementToCreate);
     js.id = id;
-    js.src = 'http://localhost:8181/context.js';
+    js.src = 'http://localhost:8181/cxs/context.js';
     fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'context'));</code></pre>
 </div>
@@ -1603,7 +1603,7 @@ information about the context for the cu
     var data = JSON.stringify(payload);
     // if we don't already have a session id, generate one
     var sessionId = cxs.sessionId || generateUUID();
-    var url = 'http://localhost:8181/context.json?sessionId=' + sessionId;
+    var url = 'http://localhost:8181/cxs/context.json?sessionId=' + sessionId;
     var xhr = new XMLHttpRequest();
     var isGet = data.length &lt; 100;
     if (isGet) {
@@ -1657,7 +1657,7 @@ information about the context for the cu
 <p>We need to either retrieve (from the initial context we retrieved previously using <code>cxs.sessionId</code>) or generate a session identifier for our request since Unomi currently requires one.</p>
 </li>
 <li>
-<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/context.json?sessionId=&#39" class="bare">http://localhost:8181/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
+<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/cxs/context.json?sessionId=&#39" class="bare">http://localhost:8181/cxs/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
 </li>
 <li>
 <p>We don&#8217;t need to provide any authentication at all to interact with this part of Unomi since we only have access to read-only data (as well as providing events as we shall see later on). If we had been using the REST API, we would have needed to provide authentication information as well.</p>

Modified: unomi/website/manual/1_3_x/index.html
URL: http://svn.apache.org/viewvc/unomi/website/manual/1_3_x/index.html?rev=1889265&r1=1889264&r2=1889265&view=diff
==============================================================================
--- unomi/website/manual/1_3_x/index.html (original)
+++ unomi/website/manual/1_3_x/index.html Wed Apr 28 15:25:06 2021
@@ -234,7 +234,7 @@ JAVA_HOME variable <a href="https://docs
 <p>9) Try accessing <a href="https://localhost:9443/cxs/cluster" class="bare">https://localhost:9443/cxs/cluster</a> with username/password: <code>karaf/karaf</code> . You might get a certificate warning in your browser, just accept it despite the warning it is safe.</p>
 </div>
 <div class="paragraph">
-<p>10) Request your first context by simply accessing : <a href="http://localhost:8181/context.js?sessionId=1234" class="bare">http://localhost:8181/context.js?sessionId=1234</a></p>
+<p>10) Request your first context by simply accessing : <a href="http://localhost:8181/cxs/context.js?sessionId=1234" class="bare">http://localhost:8181/cxs/context.js?sessionId=1234</a></p>
 </div>
 <div class="paragraph">
 <p>11) If something goes wrong, you should check the logs in <code>./data/log/karaf.log</code>. If you get errors on ElasticSearch,
@@ -420,7 +420,7 @@ Initializing cluster service endpoint...
 </div>
 <div class="paragraph">
 <p>This indicates that all the Unomi services are started and ready to react to requests. You can then open a browser and go to <code><a href="http://localhost:8181/cxs" class="bare">http://localhost:8181/cxs</a></code> to see the list of
-available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/context.json" class="bare">http://localhost:8181/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
+available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/cxs/context.json" class="bare">http://localhost:8181/cxs/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
 </div>
 </div>
 <div class="sect4">
@@ -432,7 +432,7 @@ available RESTful services or retrieve a
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.js?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.js?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -448,7 +448,7 @@ events using the cxs.collectEvents() fun
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 </div>
@@ -464,7 +464,7 @@ of the context.js(on) servlet.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"requiredProfileProperties":["*"],"requiredSessionProperties":["*"],"requireSegments":true}' http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"requiredProfileProperties":["*"],"requiredSessionProperties":["*"],"requireSegments":true}' http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -482,7 +482,7 @@ illustrated in the following example:</p
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"events":[{"eventType":"view","scope": "example","source":{"itemType": "site","scope":"example","itemId": "mysite"},"target":{"itemType":"page","scope":"example","itemId":"homepage","properties":{"pageInfo":{"referringURL":""}}}}]}' http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"events":[{"eventType":"view","scope": "example","source":{"itemType": "site","scope":"example","itemId": "mysite"},"target":{"itemType":"page","scope":"example","itemId":"homepage","properties":{"pageInfo":{"referringURL":""}}}}]}' http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -500,7 +500,7 @@ respond quickly and minimize network tra
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"events":[{"eventType":"view","scope": "example","source":{"itemType": "site","scope":"example","itemId": "mysite"},"target":{"itemType":"page","scope":"example","itemId":"homepage","properties":{"pageInfo":{"referringURL":""}}}}]}' http://localhost:8181/eventcollector?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"events":[{"eventType":"view","scope": "example","source":{"itemType": "site","scope":"example","itemId": "mysite"},"target":{"itemType":"page","scope":"example","itemId":"homepage","properties":{"pageInfo":{"referringURL":""}}}}]}' http://localhost:8181/cxs/eventcollector?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -705,10 +705,10 @@ application-level firewall you should on
 <div class="ulist">
 <ul>
 <li>
-<p><a href="http://localhost:8181/context.js">http://localhost:8181/context.js</a></p>
+<p><a href="http://localhost:8181/cxs/context.js">http://localhost:8181/cxs/context.js</a></p>
 </li>
 <li>
-<p><a href="http://localhost:8181/eventcollector">http://localhost:8181/eventcollector</a></p>
+<p><a href="http://localhost:8181/cxs/eventcollector">http://localhost:8181/cxs/eventcollector</a></p>
 </li>
 </ul>
 </div>
@@ -1154,7 +1154,7 @@ mvn clean install</code></pre>
 <div class="sect4">
 <h5 id="_testing_the_samples">Testing the samples</h5>
 <div class="paragraph">
-<p>You can now go to <a href="http://localhost:8181/index.html">http://localhost:8181/index.html</a> to test the samples code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed.</p>
+<p>You can now go to <a href="http://localhost:8181/twitter/index.html">http://localhost:8181/twitter/index.html</a> to test the samples code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed.</p>
 </div>
 <div class="paragraph">
 <p>We will now explain in greater details some concepts and see how the example works.</p>
@@ -1179,7 +1179,7 @@ mvn clean install</code></pre>
 <div class="sect3">
 <h4 id="_retrieving_context_information_from_unomi_using_the_context_servlet">4.3.3. Retrieving context information from Unomi using the context servlet</h4>
 <div class="paragraph">
-<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
+<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/cxs/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
 </div>
 <div class="paragraph">
 <p>Below is an example of asynchronously loading the initial context using the javascript version, assuming a default Unomi install running on <code><a href="http://localhost:8181" class="bare">http://localhost:8181</a></code>:</p>
@@ -1192,7 +1192,7 @@ mvn clean install</code></pre>
     if (document.getElementById(id)) return;
     js = document.createElement(elementToCreate);
     js.id = id;
-    js.src = 'http://localhost:8181/context.js';
+    js.src = 'http://localhost:8181/cxs/context.js';
     fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'context'));</code></pre>
 </div>
@@ -1246,7 +1246,7 @@ information about the context for the cu
     var data = JSON.stringify(payload);
     // if we don't already have a session id, generate one
     var sessionId = cxs.sessionId || generateUUID();
-    var url = 'http://localhost:8181/context.json?sessionId=' + sessionId;
+    var url = 'http://localhost:8181/cxs/context.json?sessionId=' + sessionId;
     var xhr = new XMLHttpRequest();
     var isGet = data.length &lt; 100;
     if (isGet) {
@@ -1300,7 +1300,7 @@ information about the context for the cu
 <p>We need to either retrieve (from the initial context we retrieved previously using <code>cxs.sessionId</code>) or generate a session identifier for our request since Unomi currently requires one.</p>
 </li>
 <li>
-<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/context.json?sessionId=&#39" class="bare">http://localhost:8181/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
+<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/cxs/context.json?sessionId=&#39" class="bare">http://localhost:8181/cxs/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
 </li>
 <li>
 <p>We don&#8217;t need to provide any authentication at all to interact with this part of Unomi since we only have access to read-only data (as well as providing events as we shall see later on). If we had been using the REST API, we would have needed to provide authentication information as well.</p>
@@ -2216,7 +2216,7 @@ profile.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"events":[{"scope":"example","eventType":"modifyConsent","source":{"itemType":"page","scope":"example","itemId":"anItemId"},"target":{"itemType":"anyType","scope":"example","itemId":"anyItemId"},"properties":{"consent":{"typeIdentifier":"newsletter","scope":"example","status":"GRANTED","statusDate":"2018-05-22T09:27:09.473Z","revokeDate":"2020-05-21T09:27:09.473Z"}}}]}' http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl -H "Content-Type: application/json" -X POST -d '{"source":{"itemId":"homepage","itemType":"page","scope":"example"},"events":[{"scope":"example","eventType":"modifyConsent","source":{"itemType":"page","scope":"example","itemId":"anItemId"},"target":{"itemType":"anyType","scope":"example","itemId":"anyItemId"},"properties":{"consent":{"typeIdentifier":"newsletter","scope":"example","status":"GRANTED","statusDate":"2018-05-22T09:27:09.473Z","revokeDate":"2020-05-21T09:27:09.473Z"}}}]}' http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 </div>
@@ -2550,7 +2550,7 @@ contains the URLs of all your cluster no
 </div>
 </div>
 <div class="paragraph">
-<p>This test page will trigger the loading of the /context.js script, which will try to retrieving the user context
+<p>This test page will trigger the loading of the /cxs/context.js script, which will try to retrieving the user context
 or create a new one if it doesn&#8217;t exist yet. It also contains an experimental integration with Facebook Login, but it
 doesn&#8217;t yet save the context back to the context server.</p>
 </div>

Modified: unomi/website/manual/1_4_x/index.html
URL: http://svn.apache.org/viewvc/unomi/website/manual/1_4_x/index.html?rev=1889265&r1=1889264&r2=1889265&view=diff
==============================================================================
--- unomi/website/manual/1_4_x/index.html (original)
+++ unomi/website/manual/1_4_x/index.html Wed Apr 28 15:25:06 2021
@@ -327,7 +327,7 @@ JAVA_HOME variable <a href="https://docs
 <p>9) Try accessing <a href="https://localhost:9443/cxs/cluster" class="bare">https://localhost:9443/cxs/cluster</a> with username/password: <code>karaf/karaf</code> . You might get a certificate warning in your browser, just accept it despite the warning it is safe.</p>
 </div>
 <div class="paragraph">
-<p>10) Request your first context by simply accessing : <a href="http://localhost:8181/context.js?sessionId=1234" class="bare">http://localhost:8181/context.js?sessionId=1234</a></p>
+<p>10) Request your first context by simply accessing : <a href="http://localhost:8181/cxs/context.js?sessionId=1234" class="bare">http://localhost:8181/cxs/context.js?sessionId=1234</a></p>
 </div>
 <div class="paragraph">
 <p>11) If something goes wrong, you should check the logs in <code>./data/log/karaf.log</code>. If you get errors on ElasticSearch,
@@ -756,7 +756,7 @@ Initializing cluster service endpoint...
 </div>
 <div class="paragraph">
 <p>This indicates that all the Unomi services are started and ready to react to requests. You can then open a browser and go to <code><a href="http://localhost:8181/cxs" class="bare">http://localhost:8181/cxs</a></code> to see the list of
-available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/context.json" class="bare">http://localhost:8181/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
+available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/cxs/context.json" class="bare">http://localhost:8181/cxs/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
 </div>
 <div class="paragraph">
 <p>Now that your service is up and running you can go look at the <a href="#_request-examples">request examples</a> to learn basic
@@ -777,7 +777,7 @@ Apache Unomi.</p>
 <div class="sect3">
 <h4 id="_how_to_read_a_profile">3.2.2. How to read a profile</h4>
 <div class="paragraph">
-<p>The simplest way to retrieve profile data for the current profile is to simply send a request to the /context.json
+<p>The simplest way to retrieve profile data for the current profile is to simply send a request to the /cxs/context.json
 endpoint. However you will need to send a body along with that request. Here&#8217;s an example:</p>
 </div>
 <div class="paragraph">
@@ -785,7 +785,7 @@ endpoint. However you will need to send
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -809,7 +809,7 @@ Java class.</p>
 </div>
 <div class="paragraph">
 <p>Note that it is also possible to access a profile&#8217;s data through the /cxs/profiles/ endpoint but that really should be
-reserved to administrative purposes. All public accesses should always use the /context.json endpoint for consistency
+reserved to administrative purposes. All public accesses should always use the /cxs/context.json endpoint for consistency
 and security.</p>
 </div>
 </div>
@@ -932,7 +932,7 @@ with the source of the event, such as 'm
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/eventcollector \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/eventcollector \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -1183,7 +1183,7 @@ security issue since it could be a way t
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.js?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.js?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -1199,7 +1199,7 @@ events using the cxs.collectEvents() fun
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 </div>
@@ -1215,7 +1215,7 @@ of the context.js(on) servlet.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -1246,7 +1246,7 @@ illustrated in the following example:</p
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -1295,7 +1295,7 @@ respond quickly and minimize network tra
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/eventcollector \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/eventcollector \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -2028,10 +2028,10 @@ application-level firewall you should on
 <div class="ulist">
 <ul>
 <li>
-<p><a href="http://localhost:8181/context.js">http://localhost:8181/context.js</a></p>
+<p><a href="http://localhost:8181/cxs/context.js">http://localhost:8181/cxs/context.js</a></p>
 </li>
 <li>
-<p><a href="http://localhost:8181/eventcollector">http://localhost:8181/eventcollector</a></p>
+<p><a href="http://localhost:8181/cxs/eventcollector">http://localhost:8181/cxs/eventcollector</a></p>
 </li>
 </ul>
 </div>
@@ -2473,7 +2473,7 @@ where PROFILE_ID is a profile identifier
 <p>The web server resolves a previous request session ID if it exists, or if it doesn&#8217;t it create a new sessionID</p>
 </li>
 <li>
-<p>A request to Apache Unomi&#8217;s /context.json servlet is made passing the web server session ID as a query parameter</p>
+<p>A request to Apache Unomi&#8217;s /cxs/context.json servlet is made passing the web server session ID as a query parameter</p>
 </li>
 <li>
 <p>Unomi uses the sessionID and tries to load an existing session, if none is found a new session is created with the
@@ -3247,7 +3247,7 @@ you can simply retrieve a profile with t
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -3347,7 +3347,7 @@ profile.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -3493,7 +3493,7 @@ IDs.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X GET http://localhost:8181/client/myprofile.[json,csv,yaml,text] \
+<pre class="highlight"><code>curl -X GET http://localhost:8181/cxs/client/myprofile.[json,csv,yaml,text] \
 --cookie "context-profile-id=PROFILE-ID"</code></pre>
 </div>
 </div>
@@ -3887,7 +3887,7 @@ mvn clean install</code></pre>
 <div class="sect4">
 <h5 id="_testing_the_samples">Testing the samples</h5>
 <div class="paragraph">
-<p>You can now go to <a href="http://localhost:8181/index.html">http://localhost:8181/index.html</a> to test the samples code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed.</p>
+<p>You can now go to <a href="http://localhost:8181/twitter/index.html">http://localhost:8181/twitter/index.html</a> to test the samples code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed.</p>
 </div>
 <div class="paragraph">
 <p>We will now explain in greater details some concepts and see how the example works.</p>
@@ -3912,7 +3912,7 @@ mvn clean install</code></pre>
 <div class="sect3">
 <h4 id="_retrieving_context_information_from_unomi_using_the_context_servlet">10.3.3. Retrieving context information from Unomi using the context servlet</h4>
 <div class="paragraph">
-<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
+<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/cxs/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
 </div>
 <div class="paragraph">
 <p>Below is an example of asynchronously loading the initial context using the javascript version, assuming a default Unomi install running on <code><a href="http://localhost:8181" class="bare">http://localhost:8181</a></code>:</p>
@@ -3925,7 +3925,7 @@ mvn clean install</code></pre>
     if (document.getElementById(id)) return;
     js = document.createElement(elementToCreate);
     js.id = id;
-    js.src = 'http://localhost:8181/context.js';
+    js.src = 'http://localhost:8181/cxs/context.js';
     fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'context'));</code></pre>
 </div>
@@ -3979,7 +3979,7 @@ information about the context for the cu
     var data = JSON.stringify(payload);
     // if we don't already have a session id, generate one
     var sessionId = cxs.sessionId || generateUUID();
-    var url = 'http://localhost:8181/context.json?sessionId=' + sessionId;
+    var url = 'http://localhost:8181/cxs/context.json?sessionId=' + sessionId;
     var xhr = new XMLHttpRequest();
     var isGet = data.length &lt; 100;
     if (isGet) {
@@ -4033,7 +4033,7 @@ information about the context for the cu
 <p>We need to either retrieve (from the initial context we retrieved previously using <code>cxs.sessionId</code>) or generate a session identifier for our request since Unomi currently requires one.</p>
 </li>
 <li>
-<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/context.json?sessionId=&#39" class="bare">http://localhost:8181/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
+<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/cxs/context.json?sessionId=&#39" class="bare">http://localhost:8181/cxs/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
 </li>
 <li>
 <p>We don&#8217;t need to provide any authentication at all to interact with this part of Unomi since we only have access to read-only data (as well as providing events as we shall see later on). If we had been using the REST API, we would have needed to provide authentication information as well.</p>
@@ -5105,7 +5105,7 @@ contains the URLs of all your cluster no
 </div>
 </div>
 <div class="paragraph">
-<p>This test page will trigger the loading of the /context.js script, which will try to retrieving the user context
+<p>This test page will trigger the loading of the /cxs/context.js script, which will try to retrieving the user context
 or create a new one if it doesn&#8217;t exist yet. It also contains an experimental integration with Facebook Login, but it
 doesn&#8217;t yet save the context back to the context server.</p>
 </div>

Modified: unomi/website/manual/1_5_x/index.html
URL: http://svn.apache.org/viewvc/unomi/website/manual/1_5_x/index.html?rev=1889265&r1=1889264&r2=1889265&view=diff
==============================================================================
--- unomi/website/manual/1_5_x/index.html (original)
+++ unomi/website/manual/1_5_x/index.html Wed Apr 28 15:25:06 2021
@@ -449,7 +449,7 @@ JAVA_HOME variable <a href="https://docs
 <p>9) Try accessing <a href="https://localhost:9443/cxs/cluster" class="bare">https://localhost:9443/cxs/cluster</a> with username/password: <code>karaf/karaf</code> . You might get a certificate warning in your browser, just accept it despite the warning it is safe.</p>
 </div>
 <div class="paragraph">
-<p>10) Request your first context by simply accessing : <a href="http://localhost:8181/context.js?sessionId=1234" class="bare">http://localhost:8181/context.js?sessionId=1234</a></p>
+<p>10) Request your first context by simply accessing : <a href="http://localhost:8181/cxs/context.js?sessionId=1234" class="bare">http://localhost:8181/cxs/context.js?sessionId=1234</a></p>
 </div>
 <div class="paragraph">
 <p>11) If something goes wrong, you should check the logs in <code>./data/log/karaf.log</code>. If you get errors on ElasticSearch,
@@ -537,7 +537,7 @@ Initializing cluster service endpoint...
 </div>
 <div class="paragraph">
 <p>This indicates that all the Unomi services are started and ready to react to requests. You can then open a browser and go to <code><a href="http://localhost:8181/cxs" class="bare">http://localhost:8181/cxs</a></code> to see the list of
-available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/context.json" class="bare">http://localhost:8181/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
+available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/cxs/context.json" class="bare">http://localhost:8181/cxs/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
 </div>
 <div class="paragraph">
 <p>You can now find an introduction page at the following location: <a href="http://localhost:8181" class="bare">http://localhost:8181</a></p>
@@ -562,7 +562,7 @@ Apache Unomi.</p>
 <div class="sect3">
 <h4 id="_how_to_read_a_profile">2.2.2. How to read a profile</h4>
 <div class="paragraph">
-<p>The simplest way to retrieve profile data for the current profile is to simply send a request to the /context.json
+<p>The simplest way to retrieve profile data for the current profile is to simply send a request to the /cxs/context.json
 endpoint. However you will need to send a body along with that request. Here&#8217;s an example:</p>
 </div>
 <div class="paragraph">
@@ -570,7 +570,7 @@ endpoint. However you will need to send
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -594,7 +594,7 @@ Java class.</p>
 </div>
 <div class="paragraph">
 <p>Note that it is also possible to access a profile&#8217;s data through the /cxs/profiles/ endpoint but that really should be
-reserved to administrative purposes. All public accesses should always use the /context.json endpoint for consistency
+reserved to administrative purposes. All public accesses should always use the /cxs/context.json endpoint for consistency
 and security.</p>
 </div>
 </div>
@@ -717,7 +717,7 @@ with the source of the event, such as 'm
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/eventcollector \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/eventcollector \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -968,7 +968,7 @@ security issue since it could be a way t
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.js?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.js?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -984,7 +984,7 @@ events using the cxs.collectEvents() fun
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 </div>
@@ -1000,7 +1000,7 @@ of the context.js(on) servlet.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -1031,7 +1031,7 @@ illustrated in the following example:</p
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -1080,7 +1080,7 @@ respond quickly and minimize network tra
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/eventcollector \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/eventcollector \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -1838,7 +1838,7 @@ org.ops4j.pax.web.ssl.keypassword=${env:
 <p>The scripting security system is multi-layered.</p>
 </div>
 <div class="paragraph">
-<p>For requests coming in through the /context.json endpoint, the following flow is used to secure incoming requests:</p>
+<p>For requests coming in through the /cxs/context.json endpoint, the following flow is used to secure incoming requests:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -1883,8 +1883,8 @@ otherwise the rest of the filtering syst
 </ul>
 </div>
 <div class="paragraph">
-<p>Apache Unomi uses two integrated scripting languages to provide this functionality: OGNL and MVEL
-OGNL is deprecated and is now disabled by default in 1.5.2 as it is little used (and replaced by better performing
+<p>Apache Unomi uses two integrated scripting languages to provide this functionality: OGNL and MVEL.
+OGNL is deprecated and is now disabled by default since 1.5.2 as it is little used (and replaced by better performing
 hardcoded property lookups). MVEL is more commonly used in rule actions as in the following example:</p>
 </div>
 <div class="paragraph">
@@ -2049,7 +2049,7 @@ org.apache.unomi.scripting.filter.ognl.f
 # This parameter controls whether OGNL scripting is allowed in expressions. Because of security reasons it is deactivated by default. If you run into compatibility issues you could reactivate it but it is at your own risk.
 org.apache.unomi.security.properties.useOGNLScripting=${env:UNOMI_SCRIPTING_USE_OGNL:-false}
 
-# This parameter controls the condition sanitizing done on the ContextServlet (/context.json). If will remove any expressions that start with "script::". It is not recommended to change this value, unless you run into compatibility issues.
+# This parameter controls the condition sanitizing done on the ContextServlet (/cxs/context.json). If will remove any expressions that start with "script::". It is not recommended to change this value, unless you run into compatibility issues.
 org.apache.unomi.security.personalization.sanitizeConditions=${env:UNOMI_SECURITY_SANITIZEPERSONALIZATIONCONDITIONS:-true}</code></pre>
 </div>
 </div>
@@ -2106,10 +2106,10 @@ application-level firewall you should on
 <div class="ulist">
 <ul>
 <li>
-<p><a href="http://localhost:8181/context.js">http://localhost:8181/context.js</a></p>
+<p><a href="http://localhost:8181/cxs/context.js">http://localhost:8181/cxs/context.js</a></p>
 </li>
 <li>
-<p><a href="http://localhost:8181/eventcollector">http://localhost:8181/eventcollector</a></p>
+<p><a href="http://localhost:8181/cxs/eventcollector">http://localhost:8181/cxs/eventcollector</a></p>
 </li>
 </ul>
 </div>
@@ -3350,7 +3350,7 @@ you can simply retrieve a profile with t
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -3450,7 +3450,7 @@ profile.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -3596,7 +3596,7 @@ IDs.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X GET http://localhost:8181/client/myprofile.[json,csv,yaml,text] \
+<pre class="highlight"><code>curl -X GET http://localhost:8181/cxs/client/myprofile.[json,csv,yaml,text] \
 --cookie "context-profile-id=PROFILE-ID"</code></pre>
 </div>
 </div>
@@ -3790,7 +3790,7 @@ where PROFILE_ID is a profile identifier
 <p>The web server resolves a previous request session ID if it exists, or if it doesn&#8217;t it create a new sessionID</p>
 </li>
 <li>
-<p>A request to Apache Unomi&#8217;s /context.json servlet is made passing the web server session ID as a query parameter</p>
+<p>A request to Apache Unomi&#8217;s /cxs/context.json servlet is made passing the web server session ID as a query parameter</p>
 </li>
 <li>
 <p>Unomi uses the sessionID and tries to load an existing session, if none is found a new session is created with the
@@ -6507,7 +6507,7 @@ Using an authorized 3rd party. This way
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -6538,7 +6538,7 @@ this can be achieved by adding <code>"ra
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -6698,7 +6698,7 @@ mvn clean install</code></pre>
 <div class="sect4">
 <h5 id="_testing_the_samples">Testing the samples</h5>
 <div class="paragraph">
-<p>You can now go to <a href="http://localhost:8181/index.html">http://localhost:8181/index.html</a> to test the samples code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed.</p>
+<p>You can now go to <a href="http://localhost:8181/twitter/index.html">http://localhost:8181/twitter/index.html</a> to test the samples code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed.</p>
 </div>
 <div class="paragraph">
 <p>We will now explain in greater details some concepts and see how the example works.</p>
@@ -6723,7 +6723,7 @@ mvn clean install</code></pre>
 <div class="sect3">
 <h4 id="_retrieving_context_information_from_unomi_using_the_context_servlet">11.3.3. Retrieving context information from Unomi using the context servlet</h4>
 <div class="paragraph">
-<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
+<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/cxs/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
 </div>
 <div class="paragraph">
 <p>Below is an example of asynchronously loading the initial context using the javascript version, assuming a default Unomi install running on <code><a href="http://localhost:8181" class="bare">http://localhost:8181</a></code>:</p>
@@ -6736,7 +6736,7 @@ mvn clean install</code></pre>
     if (document.getElementById(id)) return;
     js = document.createElement(elementToCreate);
     js.id = id;
-    js.src = 'http://localhost:8181/context.js';
+    js.src = 'http://localhost:8181/cxs/context.js';
     fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'context'));</code></pre>
 </div>
@@ -6790,7 +6790,7 @@ information about the context for the cu
     var data = JSON.stringify(payload);
     // if we don't already have a session id, generate one
     var sessionId = cxs.sessionId || generateUUID();
-    var url = 'http://localhost:8181/context.json?sessionId=' + sessionId;
+    var url = 'http://localhost:8181/cxs/context.json?sessionId=' + sessionId;
     var xhr = new XMLHttpRequest();
     var isGet = data.length &lt; 100;
     if (isGet) {
@@ -6844,7 +6844,7 @@ information about the context for the cu
 <p>We need to either retrieve (from the initial context we retrieved previously using <code>cxs.sessionId</code>) or generate a session identifier for our request since Unomi currently requires one.</p>
 </li>
 <li>
-<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/context.json?sessionId=&#39" class="bare">http://localhost:8181/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
+<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/cxs/context.json?sessionId=&#39" class="bare">http://localhost:8181/cxs/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
 </li>
 <li>
 <p>We don&#8217;t need to provide any authentication at all to interact with this part of Unomi since we only have access to read-only data (as well as providing events as we shall see later on). If we had been using the REST API, we would have needed to provide authentication information as well.</p>
@@ -7915,7 +7915,7 @@ contains the URLs of all your cluster no
 </div>
 </div>
 <div class="paragraph">
-<p>This test page will trigger the loading of the /context.js script, which will try to retrieving the user context
+<p>This test page will trigger the loading of the /cxs/context.js script, which will try to retrieving the user context
 or create a new one if it doesn&#8217;t exist yet. It also contains an experimental integration with Facebook Login, but it
 doesn&#8217;t yet save the context back to the context server.</p>
 </div>
@@ -8973,7 +8973,7 @@ They allow to modify an item, that would
 </div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2020-11-24 14:42:54 +0100
+Last updated 2021-04-28 17:01:53 +0200
 </div>
 </div>
 </body>

Modified: unomi/website/manual/latest/index.html
URL: http://svn.apache.org/viewvc/unomi/website/manual/latest/index.html?rev=1889265&r1=1889264&r2=1889265&view=diff
==============================================================================
--- unomi/website/manual/latest/index.html (original)
+++ unomi/website/manual/latest/index.html Wed Apr 28 15:25:06 2021
@@ -102,6 +102,7 @@
 <li><a href="#_migration_steps">4.1.3. Migration steps</a></li>
 </ul>
 </li>
+<li><a href="#_important_changes_in_public_servlets_since_version_1_5_5_and_2_0_0">4.2. Important changes in public servlets since version 1.5.5 and 2.0.0</a></li>
 </ul>
 </li>
 <li><a href="#_queries_and_aggregations">5. Queries and aggregations</a>
@@ -449,7 +450,7 @@ JAVA_HOME variable <a href="https://docs
 <p>9) Try accessing <a href="https://localhost:9443/cxs/cluster" class="bare">https://localhost:9443/cxs/cluster</a> with username/password: <code>karaf/karaf</code> . You might get a certificate warning in your browser, just accept it despite the warning it is safe.</p>
 </div>
 <div class="paragraph">
-<p>10) Request your first context by simply accessing : <a href="http://localhost:8181/context.js?sessionId=1234" class="bare">http://localhost:8181/context.js?sessionId=1234</a></p>
+<p>10) Request your first context by simply accessing : <a href="http://localhost:8181/cxs/context.js?sessionId=1234" class="bare">http://localhost:8181/cxs/context.js?sessionId=1234</a></p>
 </div>
 <div class="paragraph">
 <p>11) If something goes wrong, you should check the logs in <code>./data/log/karaf.log</code>. If you get errors on ElasticSearch,
@@ -537,7 +538,7 @@ Initializing cluster service endpoint...
 </div>
 <div class="paragraph">
 <p>This indicates that all the Unomi services are started and ready to react to requests. You can then open a browser and go to <code><a href="http://localhost:8181/cxs" class="bare">http://localhost:8181/cxs</a></code> to see the list of
-available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/context.json" class="bare">http://localhost:8181/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
+available RESTful services or retrieve an initial context at <code><a href="http://localhost:8181/cxs/context.json" class="bare">http://localhost:8181/cxs/context.json</a></code> (which isn&#8217;t very useful at this point).</p>
 </div>
 <div class="paragraph">
 <p>You can now find an introduction page at the following location: <a href="http://localhost:8181" class="bare">http://localhost:8181</a></p>
@@ -562,7 +563,7 @@ Apache Unomi.</p>
 <div class="sect3">
 <h4 id="_how_to_read_a_profile">2.2.2. How to read a profile</h4>
 <div class="paragraph">
-<p>The simplest way to retrieve profile data for the current profile is to simply send a request to the /context.json
+<p>The simplest way to retrieve profile data for the current profile is to simply send a request to the /cxs/context.json
 endpoint. However you will need to send a body along with that request. Here&#8217;s an example:</p>
 </div>
 <div class="paragraph">
@@ -570,7 +571,7 @@ endpoint. However you will need to send
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -594,7 +595,7 @@ Java class.</p>
 </div>
 <div class="paragraph">
 <p>Note that it is also possible to access a profile&#8217;s data through the /cxs/profiles/ endpoint but that really should be
-reserved to administrative purposes. All public accesses should always use the /context.json endpoint for consistency
+reserved to administrative purposes. All public accesses should always use the /cxs/context.json endpoint for consistency
 and security.</p>
 </div>
 </div>
@@ -717,7 +718,7 @@ with the source of the event, such as 'm
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/eventcollector \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/eventcollector \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -968,7 +969,7 @@ security issue since it could be a way t
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.js?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.js?sessionId=1234</code></pre>
 </div>
 </div>
 <div class="paragraph">
@@ -984,7 +985,7 @@ events using the cxs.collectEvents() fun
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl http://localhost:8181/context.json?sessionId=1234</code></pre>
+<pre class="highlight"><code>curl http://localhost:8181/cxs/context.json?sessionId=1234</code></pre>
 </div>
 </div>
 </div>
@@ -1000,7 +1001,7 @@ of the context.js(on) servlet.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -1031,7 +1032,7 @@ illustrated in the following example:</p
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -1080,7 +1081,7 @@ respond quickly and minimize network tra
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/eventcollector \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/eventcollector \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -1838,7 +1839,7 @@ org.ops4j.pax.web.ssl.keypassword=${env:
 <p>The scripting security system is multi-layered.</p>
 </div>
 <div class="paragraph">
-<p>For requests coming in through the /context.json endpoint, the following flow is used to secure incoming requests:</p>
+<p>For requests coming in through the /cxs/context.json endpoint, the following flow is used to secure incoming requests:</p>
 </div>
 <div class="imageblock">
 <div class="content">
@@ -1883,8 +1884,8 @@ otherwise the rest of the filtering syst
 </ul>
 </div>
 <div class="paragraph">
-<p>Apache Unomi uses two integrated scripting languages to provide this functionality: OGNL and MVEL
-OGNL is deprecated and is now disabled by default in 1.5.2 as it is little used (and replaced by better performing
+<p>Apache Unomi uses two integrated scripting languages to provide this functionality: OGNL and MVEL.
+OGNL is deprecated and is now disabled by default since 1.5.2 as it is little used (and replaced by better performing
 hardcoded property lookups). MVEL is more commonly used in rule actions as in the following example:</p>
 </div>
 <div class="paragraph">
@@ -2049,7 +2050,7 @@ org.apache.unomi.scripting.filter.ognl.f
 # This parameter controls whether OGNL scripting is allowed in expressions. Because of security reasons it is deactivated by default. If you run into compatibility issues you could reactivate it but it is at your own risk.
 org.apache.unomi.security.properties.useOGNLScripting=${env:UNOMI_SCRIPTING_USE_OGNL:-false}
 
-# This parameter controls the condition sanitizing done on the ContextServlet (/context.json). If will remove any expressions that start with "script::". It is not recommended to change this value, unless you run into compatibility issues.
+# This parameter controls the condition sanitizing done on the ContextServlet (/cxs/context.json). If will remove any expressions that start with "script::". It is not recommended to change this value, unless you run into compatibility issues.
 org.apache.unomi.security.personalization.sanitizeConditions=${env:UNOMI_SECURITY_SANITIZEPERSONALIZATIONCONDITIONS:-true}</code></pre>
 </div>
 </div>
@@ -2106,10 +2107,10 @@ application-level firewall you should on
 <div class="ulist">
 <ul>
 <li>
-<p><a href="http://localhost:8181/context.js">http://localhost:8181/context.js</a></p>
+<p><a href="http://localhost:8181/cxs/context.js">http://localhost:8181/cxs/context.js</a></p>
 </li>
 <li>
-<p><a href="http://localhost:8181/eventcollector">http://localhost:8181/eventcollector</a></p>
+<p><a href="http://localhost:8181/cxs/eventcollector">http://localhost:8181/cxs/eventcollector</a></p>
 </li>
 </ul>
 </div>
@@ -2605,6 +2606,46 @@ the profiles:</p>
 </div>
 </div>
 </div>
+<div class="sect2">
+<h3 id="_important_changes_in_public_servlets_since_version_1_5_5_and_2_0_0">4.2. Important changes in public servlets since version 1.5.5 and 2.0.0</h3>
+<div class="paragraph">
+<p>What used to be dedicated servlets are now part of the REST endpoints.
+Prior to version 1.5.5 the following servlets were used:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>/context.js /context.json</p>
+</li>
+<li>
+<p>/eventcollector</p>
+</li>
+<li>
+<p>/client</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>In version 2.0.0 and 1.5.5 and later you have to use the new <code>cxs</code> REST endpoints:</p>
+</div>
+<div class="ulist">
+<ul>
+<li>
+<p>/cxs/context.js /cxs/context.json</p>
+</li>
+<li>
+<p>/cxs/eventcollector</p>
+</li>
+<li>
+<p>/cxs/client</p>
+</li>
+</ul>
+</div>
+<div class="paragraph">
+<p>The old servlets have been deprecated and will be removed in a future major version, so make sure
+to update your client applications.</p>
+</div>
+</div>
 </div>
 </div>
 <div class="sect1">
@@ -3350,7 +3391,7 @@ you can simply retrieve a profile with t
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -3450,7 +3491,7 @@ profile.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json?sessionId=1234 \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json?sessionId=1234 \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -3596,7 +3637,7 @@ IDs.</p>
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X GET http://localhost:8181/client/myprofile.[json,csv,yaml,text] \
+<pre class="highlight"><code>curl -X GET http://localhost:8181/cxs/client/myprofile.[json,csv,yaml,text] \
 --cookie "context-profile-id=PROFILE-ID"</code></pre>
 </div>
 </div>
@@ -3790,7 +3831,7 @@ where PROFILE_ID is a profile identifier
 <p>The web server resolves a previous request session ID if it exists, or if it doesn&#8217;t it create a new sessionID</p>
 </li>
 <li>
-<p>A request to Apache Unomi&#8217;s /context.json servlet is made passing the web server session ID as a query parameter</p>
+<p>A request to Apache Unomi&#8217;s /cxs/context.json servlet is made passing the web server session ID as a query parameter</p>
 </li>
 <li>
 <p>Unomi uses the sessionID and tries to load an existing session, if none is found a new session is created with the
@@ -6507,7 +6548,7 @@ Using an authorized 3rd party. This way
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -6538,7 +6579,7 @@ this can be achieved by adding <code>"ra
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl -X POST http://localhost:8181/context.json \
+<pre class="highlight"><code>curl -X POST http://localhost:8181/cxs/context.json \
 -H "Content-Type: application/json" \
 -d @- &lt;&lt;'EOF'
 {
@@ -6698,7 +6739,7 @@ mvn clean install</code></pre>
 <div class="sect4">
 <h5 id="_testing_the_samples">Testing the samples</h5>
 <div class="paragraph">
-<p>You can now go to <a href="http://localhost:8181/index.html">http://localhost:8181/index.html</a> to test the samples code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed.</p>
+<p>You can now go to <a href="http://localhost:8181/twitter/index.html">http://localhost:8181/twitter/index.html</a> to test the samples code. The page is very simple, you will see a Twitter button, which, once clicked, will open a new window to tweet about the current page. The original page should be updated with the new values of the properties coming from Unomi. Additionnally, the raw JSON response is displayed.</p>
 </div>
 <div class="paragraph">
 <p>We will now explain in greater details some concepts and see how the example works.</p>
@@ -6723,7 +6764,7 @@ mvn clean install</code></pre>
 <div class="sect3">
 <h4 id="_retrieving_context_information_from_unomi_using_the_context_servlet">11.3.3. Retrieving context information from Unomi using the context servlet</h4>
 <div class="paragraph">
-<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
+<p>Unomi provides two ways to retrieve context: either as a pure JSON object containing strictly context information or as a couple of JSON objects augmented with javascript functions that can be used to interact with the Unomi server using the <code>&lt;context server base URL&gt;/cxs/context.json</code> or <code>&lt;context server base URL&gt;/context.js</code> URLs, respectively.</p>
 </div>
 <div class="paragraph">
 <p>Below is an example of asynchronously loading the initial context using the javascript version, assuming a default Unomi install running on <code><a href="http://localhost:8181" class="bare">http://localhost:8181</a></code>:</p>
@@ -6736,7 +6777,7 @@ mvn clean install</code></pre>
     if (document.getElementById(id)) return;
     js = document.createElement(elementToCreate);
     js.id = id;
-    js.src = 'http://localhost:8181/context.js';
+    js.src = 'http://localhost:8181/cxs/context.js';
     fjs.parentNode.insertBefore(js, fjs);
 }(document, 'script', 'context'));</code></pre>
 </div>
@@ -6791,7 +6832,7 @@ information about the context for the cu
     var data = JSON.stringify(payload);
     // if we don't already have a session id, generate one
     var sessionId = cxs.sessionId || generateUUID();
-    var url = 'http://localhost:8181/context.json?sessionId=' + sessionId;
+    var url = 'http://localhost:8181/cxs/context.json?sessionId=' + sessionId;
     var xhr = new XMLHttpRequest();
     var isGet = data.length &lt; 100;
     if (isGet) {
@@ -6845,7 +6886,7 @@ information about the context for the cu
 <p>We need to either retrieve (from the initial context we retrieved previously using <code>cxs.sessionId</code>) or generate a session identifier for our request since Unomi currently requires one.</p>
 </li>
 <li>
-<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/context.json?sessionId=&#39" class="bare">http://localhost:8181/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
+<p>We&#8217;re calling the <code>ContextServlet</code> using the default install URI, specifying the session identifier: <code><a href="http://localhost:8181/cxs/context.json?sessionId=&#39" class="bare">http://localhost:8181/cxs/context.json?sessionId=&#39</a>; + sessionId</code>. This URI requests context from Unomi, resulting in an updated <code>cxs</code> object in the javascript global scope. The context server can reply to this request either by returning a JSON-only object containing solely the context information as is the case when the requested URI is <code>context.json</code>. However, if the client requests <code>context.js</code> then useful functions to interact with Unomi are added to the <code>cxs</code> object in addition to the context information as depicted above.</p>
 </li>
 <li>
 <p>We don&#8217;t need to provide any authentication at all to interact with this part of Unomi since we only have access to read-only data (as well as providing events as we shall see later on). If we had been using the REST API, we would have needed to provide authentication information as well.</p>
@@ -6902,7 +6943,7 @@ server via the <code>filters</code> fiel
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl --location --request POST 'http://localhost:8181/context.json' \
+<pre class="highlight"><code>curl --location --request POST 'http://localhost:8181/cxs/context.json' \
 --header 'Content-Type: application/json' \
 --header 'Cookie: JSESSIONID=48C8AFB3E18B8E3C93C2F4D5B7BD43B7; context-profile-id=01060c4c-a055-4c8f-9692-8a699d0c434a' \
 --data-raw '{
@@ -6976,7 +7017,7 @@ conditions and we want to know which is
 </div>
 <div class="listingblock">
 <div class="content">
-<pre class="highlight"><code>curl --location --request POST 'http://localhost:8181/context.json' \
+<pre class="highlight"><code>curl --location --request POST 'http://localhost:8181/cxs/context.json' \
 --header 'Content-Type: application/json' \
 --header 'Cookie: JSESSIONID=48C8AFB3E18B8E3C93C2F4D5B7BD43B7; context-profile-id=01060c4c-a055-4c8f-9692-8a699d0c434a' \
 --data-raw '{
@@ -8099,7 +8140,7 @@ contains the URLs of all your cluster no
 </div>
 </div>
 <div class="paragraph">
-<p>This test page will trigger the loading of the /context.js script, which will try to retrieving the user context
+<p>This test page will trigger the loading of the /cxs/context.js script, which will try to retrieving the user context
 or create a new one if it doesn&#8217;t exist yet. It also contains an experimental integration with Facebook Login, but it
 doesn&#8217;t yet save the context back to the context server.</p>
 </div>
@@ -9157,7 +9198,7 @@ They allow to modify an item, that would
 </div>
 <div id="footer">
 <div id="footer-text">
-Last updated 2020-11-24 14:42:54 +0100
+Last updated 2021-04-28 17:01:53 +0200
 </div>
 </div>
 </body>