title: Why does my static route change in spark framework when using get request?
body: <p>I have the following simple main class that executes Spark.</p>
  
  <pre><code>    Spark.port(4570);       
      final Configuration configuration = new Configuration(new Version(2, 3, 0));
      configuration.setClassForTemplateLoading(SparkHandler.class, "/");
  
      Spark.staticFileLocation("/public");
  
      Spark.get("/", (request, response) -&gt; {
  
          // read patterns
  
          // attributes for web-interface.
          Map&lt;String, Object&gt; attributes = new HashMap&lt;&gt;();
          attributes.put("data", "someData");
  
          return new ModelAndView(attributes, "timeline.ftl");
      } , new FreeMarkerEngine());
  </code></pre>
  
  <p>Everything woks fine. When I go to <a href="http://localhost:4570/" rel="nofollow">http://localhost:4570/</a> I got the requested web-page!</p>
  
  <p>I now change the path in the get statement to <code>/a/b/c</code> but execute the very same code:</p>
  
  <pre><code>    Spark.port(4570);   
      final Configuration configuration = new Configuration(new Version(2, 3, 0));
      configuration.setClassForTemplateLoading(SparkHandler.class, "/");
  
      Spark.staticFileLocation("/public");
  
      Spark.get("/a/b/c", (request, response) -&gt; {
  
          // read patterns
  
          // attributes for web-interface.
          Map&lt;String, Object&gt; attributes = new HashMap&lt;&gt;();
          attributes.put("data", "someData");
  
          return new ModelAndView(attributes, "timeline.ftl");
      } , new FreeMarkerEngine());
  </code></pre>
  
  <p>If I now go to e.g. <a href="http://localhost:4570/a/b/c" rel="nofollow">http://localhost:4570/a/b/c</a>, it returns messages that lots of resources that could previously be found are not available any more. E.g.</p>
  
  <blockquote>
    <p>INFO 28/07/16 14:45:03:The requested route [/a/b/vis/vis.js] has not been mapped in Spark</p>
  </blockquote>
  
  <p>However, it is exactly in the location /public/vis/vis.js. </p>
  
  <p>Does that get command change my static directory? Or is something happening here that I just do not understand :).</p>