<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 22.08.2012 09:48, schrieb Reshma
      Maner:<br>
    </div>
    <blockquote cite="mid:50348EC8.5000800@transworld-compressor.com"
      type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      Hi,<br>
      <br>
      I have set up osm2pgsql,mapnik on ubuntu server. I have also
      generated tiles locally.<br>
      Now I want to display these tiles on map in a JSP page. I am using
      open layers.<br>
      I have been trying it. The code works fine in html, but if same
      thing I do in a jsp page, it does not open map tiles. Only pink
      canvas is displayed. On rightclick, it displayes map tile path as
      "/LocalFolder///.png". source code is given below.<br>
      Please let me know what is the procedure I should follow to
      display local map on a jsp page(Tomcat server),<br>
      Code:<br>
      <br>
      <br>
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-western">
        <pre wrap="">         var newLayer = new OpenLayers.Layer.OSM("Localhost",
"IndiaMap/${z}/${x}/${y}.png", {numZoomLevels: 4, alpha: true,
isBaseLayer: true});</pre>
      </div>
    </blockquote>
    Here's the correct path required.<br>
    I guess, what you call "LocalFolder" above is "IndiaMap", but make
    sure that this relative URL (so base url of the jsp page +
    /IndiaMap/ leads to the corresponding folder.<br>
    <br>
    The HTML page is mapped directly to the file system; the JSP-file is
    mapped differently through the java aware web server.<br>
    One possibility is to use the complete URL here, so instead
    "IndiaMap/${z}/${x}/${y}.png" use
    <a class="moz-txt-link-rfc2396E" href="http://complete-url-like-you-see-it.in/the/image/properties/on/the/working/html-file/IndiaMap/${z}/${x/${y}.png">"http://complete-url-like-you-see-it.in/the/image/properties/on/the/working/html-file/IndiaMap/${z}/${x/${y}.png"</a>,
    where - sure, IndiaMap/... should not be doubled.<br>
    <br>
    regards<br>
    Peter<br>
    <br>
  </body>
</html>