ubanide

Installing Arcgis_js_jsapi 3.2 on apache/tomcat

Discussion created by ubanide on Dec 20, 2012
I have installed apache2.2/tomcat 7 on my windows server 2003.  Apache is up.  tomcat is up.  Arcgis server 10.1 is up. I can connect to it from another machine with arcmap.
I followed the instructions for installing arcgis_js_jsapi.  However the instructions are only for IIS.  So what I did was load it into the webapps directory in tomcat.  Then I change the HOSTNAME AND PATH in the files listed in the instructions.  Tomcat shows that arcgis_js_jsapi is running.  Then I loaded the the arcgis webadaptor and configured it accourding to it's instructions.  Now I am trying the to test it using the test map HTML file given with the arcgis_js_jsapi instructions.
I doesn't work.

My Tomcat directories look like this:
My tomcat webapps directory look like this
[HTML]
\webapps
       \arcgis  /* this is the webadaptor
       \arcgis_js_jsapi  /* the javascript library
              \library
                   \3.2
                           \jsapi
                                  js
                                         \dgrid
                                         \dojo
                                         \esri
                                         \put-selector
                                         \xstyle

                           \jsapicompact
[/HTML]

I did not change anything in the any WEB-INF directories.  Should I?

This the test HTML I am using.

[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test Map</title>
<link rel="stylesheet" type="text/css" href="http://gsdserver1:8090/arcgis_js_api/library/3.2/jsapi/js/dojo/dijit/themes/tundra/tundra.css"/>

    <link rel="stylesheet" type="text/css" href="http://gsdserver1:8090/arcgis_js_api/library/3.2/jsapi/js/esri/css/esri.css" />

    <script type="text/javascript" src="http://gsdserver1:8090/arcgis_js_api/library/3.2/jsapi/init.js"></script>





    <script type="text/javascript">


alert("before require");
      dojo.require("esri.map");
alert("after require");


      function init() {

  alert("Inside init")

        var myMap = new esri.Map("mapDiv");



        //note that if you do not have public Internet access then you will need to point this url to your own locally accessible cached service.



        var myTiledMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gsdserver1:8090/arcgis/rest/services/SampleWorldCities/MapServer");



        myMap.addLayer(myTiledMapServiceLayer);



      }


alert("before onload")
      dojo.addOnLoad(init);



    </script>




</head>
<body class="tundra">
<h1> Test Map try # 1</h1>

    <div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"></div>

</body>
</html>
[/HTML]

Outcomes