title: Rendering static file as URI in Grails 3
body: <p>In Grails 2.x, the following works:</p>
  
  <pre><code>class UrlMappings {
  
      static mappings = {
          /**
           * Serving the index.html directly
           */
          "/"(uri: "/ng/app/index.html")
      }
  }
  </code></pre>
  
  <p>Given that there is a <code>index.html</code> file available in <code>web-app/ng/app/</code> directory. Now when we browse the URL <code>http://localhost:8080</code> in Grails 2, the <code>index.html</code> renders automatically.</p>
  
  <p>In Grails 3, I added the same <code>index.html</code> file in <code>src/main/webapp/</code>, I can properly browse the same like <code>http://localhost:8080/static/index.html</code>.</p>
  
  <p>So, I'm trying to do the same in <code>UrlMappings.groovy</code>:</p>
  
  <pre><code>class UrlMappings {
  
      static mappings = {
          /**
           * Serving the index.html directly
           */
          "/"(uri: "/static/index.html")
      }
  }
  </code></pre>
  
  <p>But this is giving me error <code>{"message":"Internal server error","error":500}</code>:</p>
  
  <pre><code>ERROR org.grails.web.errors.GrailsExceptionResolver - UrlMappingException occurred when processing request: [GET] /
  Unable to establish controller name to dispatch for [null]. Dynamic closure invocation returned null. Check your mapping file is correct, when assigning the controller name as a request parameter it cannot be an optional token!. Stacktrace follows:
  grails.web.mapping.exceptions.UrlMappingException: Unable to establish controller name to dispatch for [null]. Dynamic closure invocation returned null. Check your mapping file is correct, when assigning the controller name as a request parameter it cannot be an optional token!
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>I've create my app with Grails 3.1.8 Angular profile and later removed Angular related stuff like Grails GSP plugin, Asset pipeline etc.</p>