title: Vertx-web: where do I place webroot folder?
body: <p>This should be an easy one, but it's not been so far. I've been working with <code>vert.x 2</code> for a bit and switched to <code>vert.x 3</code> recently. I thought I'd try a simple vertx-web example but can't get past a simple serving up of static files.</p>
  
  <p>My server class contains the following snippets:</p>
  
  <pre><code>    HttpServer server = vertx.createHttpServer();
      Router router = ...;
      router.route("/static/*").handler(StaticHandler.create().setCachingEnabled(false));
      server.requestHandler(router::accept).listen(ctx.port);
  </code></pre>
  
  <p>I'm using Eclipse, but have also been trying running <code>vertx</code> from the the command line. I'm also using Maven. I have three webroot folders, and <code>vert.x</code> can find none of them:</p>
  
  <pre><code>myproject/webroot
  myproject/src/main/resources/webroot
  myproject/src/main/java/webroot
  </code></pre>
  
  <p>Each of those 'webroot's contains an <code>index.html</code>, and a <code>css/base.css</code> file.</p>
  
  <p>The first one is in my project's root folder. The second is in the Maven resources folder, and the third should be flat-out on my <code>classpath</code>. In my Eclipse run config, I added <em>myproject/src/main/resources/webroot</em> to the classpath, and I made sure my working directory was set to 'myproject'. When running from the command line, I'm in the <em>myproject</em> directory, and my script looks like this:</p>
  
  <pre><code>JAVA_OPTS="-Dmyproject.port=8099" CLASSPATH="src/main/java:src/main/resources:target/dependencies/*:target/classes" vertx run com.my.MyProject
  </code></pre>
  
  <p>No matter what, I always get <strong>404s</strong> when I try any of these URLs:</p>
  
  <pre><code>http://localhost:8099
  http://localhost:8099/
  http://localhost:8099/index.html
  http://localhost:8099/static/css/base.css
  </code></pre>
  
  <p>Anything else I need to be doing?</p>