title: fail to find the path when running on the server using jsp
body: <p>All the code below are written in jsp. When I start the server, it should alert the json type. When I run the code below not on the server, it actually works.  I suspect if is there something wrong with my file path. The path of the data.json is <strong>C:\Users\fujimaro\Desktop\data.json</strong> , otherwise I have no clue what could be wrong.</p>
  <pre><code>&lt;%@page import=&quot;java.util.ArrayList&quot;%&gt;
  &lt;%@page import=&quot;java.util.List&quot;%&gt;
  &lt;%@page import=&quot;com.tutorials.*&quot;%&gt;
  &lt;%@page import=&quot;javax.swing.*&quot;%&gt;
  &lt;%@page import=&quot;com.tutorials.*&quot;%&gt;
  &lt;%@page import=&quot;java.io.FileNotFoundException&quot;%&gt;
  
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;title&gt;noName&lt;/title&gt;
  
      &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js&quot;&gt;&lt;/script&gt; 
      &lt;link rel=&quot;stylesheet&quot; href=&quot;https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css&quot;&gt;
      &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js&quot;&gt;&lt;/script&gt;
      &lt;script type=&quot;text/javascript&quot; src=&quot;javascrip.js&quot;&gt;&lt;/script&gt;
      &lt;script type=&quot;text/javascript&quot; src=&quot;data.json&quot;&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  
  &lt;script type=&quot;text/javascript&quot;&gt;
  
      $(document).ready(function() {
      
          var mydata = JSON.parse(data);
      
          var arr = [];
          for(var x in mydata) {
              arr.push(mydata[x].name);
              arr.push(mydata[x].age);
          }
          for(var y in arr ) {
              alert(arr[y]);
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p><em><strong>Json</strong></em></p>
  <blockquote>
  <p>data = '[{&quot;name&quot; : &quot;Harry&quot;, &quot;age&quot; : &quot;32&quot;}]';</p>
  </blockquote>