Loading local tiles... Not working when hosted on server

Hi All,

Am new to OSM… I want to show map offline, hence I generated local tiles.
I followed http://braincrunch.tumblr.com/post/9921938947/maperitive-tutorial-a-hiking-web-map-in-ten-easy-steps link…

Everything works when I create a html file and open it… I can see the tiles as said in the link…

But now I want to host the html in jboss. and when I do that tiles are not shown…

The reason for this is, the code where “tiles/${z}/${x}/${y}.png” is not working… i.e when i debug, I get the path as tiles//.png… which means the openlayer.js is not able to replace ${x}, ${y} and ${z} when the html is hosted in jboss server.

Can someone kindly help me out with this…

Thanks in advance,
Irfan