steeeeps

dojo is not defined in installing jsapi2.6 on tomcat

Discussion created by steeeeps on Mar 3, 2012
Latest reply on Mar 4, 2012 by DSwingley-esristaff
i have copied ArcGIS JSAPI 2.6  to tomcat 6.0, and searched for the text '[HOSTNAME_AND_PATH_TO_JSAPI]', and replaced this text with "localhost:8080/arcgis_js_api/library/2.6/arcgis/" of all the files.
but when i use the test code :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Simple Map</title>
  <link rel="stylesheet" type="text/css" href="http://localhost:8080/arcgis_js_api/library/2.6/jsapi/js/dojo/dijit/themes/tundra/tundra.css"/>
  <script type="text/javascript" src="http://localhost:8080/arcgis_js_api/library/2.6/jsapi/"></script>
  <script type="text/javascript">
   dojo.require("esri.map");
   function 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 accesible cached service.
    var myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer");
    myMap.addLayer(myTiledMapServiceLayer);
   }

   dojo.addOnLoad(init);

  </script>
 </head>
 <body class="tundra">
  <div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"></div>
 </body>
</html>

it throw an error like this:"Uncaught SyntaxError: Unexpected identifier  , dojo is not defined".
but if i use the jdk 1.5  ,it not throw any error,
i means the error "dojo is not defined " only throwed in the environment of jdk 1.6.
so ,can you help me to solve the problem?
thx?

Outcomes