Installing ArcGIS Javascript API

Discussion created by ftuang on Aug 9, 2012
Latest reply on Aug 10, 2012 by ftuang
When installing ArcGIS Javascript API, how do I specify the server url for the child modules? 

The main modules loaded by the handler (default.ashx) have the correct url (e.g. http://servername/library/3.1/jsapi), but the child modules still get loaded from the serverapi.arcgisonline.com, e.g. http://serverapi.arcgisonline.com/jsapi/arcgis/3.1/js/dojo/dojox/gfx/svg.js.

The installation guide mentioned the following, do I need ArcGIS Server for this?  I have ArcGIS Server 10.1 installed, with the web adapter, but I couldn't find where to configure this.  Do you mind explaining how it works and how to configure it? Thanks a lot in advance!

�?�Change the ArcGIS Services Directory "View In JavaScript" URL. Instructions are given in "Configuring the REST API" in the ArcGIS Server REST SDK. On Windows, the location is <Installation Location>\DeveloperKit\Help\REST\index.html. On UNIX and Linux, the location is http://<myserver>:8399/<instance>/sdk/rest/index.html where myserver is your server name and instance is the instance name (jsapi is the default). �?�Find the "JavaScript API" section for either .NET or Java for more information about parameter values.
�?�For .NET, the parameters to change in rest.config are <ArcGIS> and <ArcGISCSS>. Replace serverapi.arcgisonline.com with your server domain name.
�?�For Java, the parameters to change in rest-config.properties are jsapi.arcgis and jsapi.arcgis.css. Replace serverapi.arcgisonline.com with your server domain name.