B
B
beduin012016-03-02 10:25:00
JavaScript
beduin01, 2016-03-02 10:25:00

How to initialize subfolders in JS?

There is an application that downloaded libraries from the network. Now it needs to be run on a computer without a network. I set up an http server (vibed.org) which I assigned to hosts as the name of the domain to which the call was made.
In total, now I have 127.0.0.2 pointing to js.arcgis.com
However, in the Chrome console, it turned out that the application itself accesses js.arcgis.com/3.10/ and receives a 404 error. It is obvious that it wanted to get something from there. I decided that probably at the server level, when accessing the root folder, this file is being processed and it is loading something. In the 3.10 folder I found the following files:
index.jsp index.php and Default.ashx
I tried to make it so that when accessing localhost/3.10 I was redirected to the file: index.jsp but got the following error:
img.ctrlv.in/img/16/03/02/56d6950bb7eb9.jpg
The contents of index.jsp itself:

<%@page contentType="application/x-javascript; charset=utf-8" session="false" %>
<jsp:include page="js/dojo/dojo/dojo.js" />
<jsp:include page="js/esri/jsapi.js" />

Index.php says:
<?php
header("Content-type:application/x-javascript");
readfile("js/dojo/dojo/dojo.js");
readfile("js/esri/jsapi.js");
?>

Is there any crutch that would allow this to be done?
Obviously, it loads subfolders (which are also there). Question. Can this be somehow made to work.
I tried to go in a more regular way (which is in the documentation), but the application is wildly crooked and therefore now I am trying to pervert like this.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question