Serving JSONP

To serve a resource, put the resource into the "static" Jetty webapp directory (server/webapps/static in Co-browse deployment) of every Co-browse node in your cluster. You can then reference the resource as http://<COBROWSE_SERVER_URL>/static/your-resource.extension.

Supported extensions are *.json, *.html, *.xml.

JSONP Example

Example: Serving Localization (JSON)

Suppose you wanted to override one key in the localization files so that the title of all UI dialogs would be "My Company" instead of "Co-browse". You could accomplish this by doing the following:

Create a file with the following content:

{"modalTitle":"My Company"}

Save the file with the .json extension. For example, my-localization.json.

Copy the file into the server/webapps/static folder of every Co-browse server in your cluster.

In your instrumentation, tell Co-browse to use this file for localization using the Configuration API: