title: configure jetty in spring boot
body: <p>I am developing a multi-module spring boot project. My project structure look like</p>
  
  <blockquote>
    <ul>
    <li>myProject(parent)</li>
    <li>front-end
    <ul>
    <li>src/main/resources
    <ul>
    <li>frontend
    <ul>
    <li>index.html</li>
    </ul></li>
    </ul></li>
    </ul></li>
    <li>rest
    <ul>
    <li>src/main/java
    <ul>
    <li>com.example
    <ul>
    <li>MyWebApp.java</li>
    </ul></li>
    <li>com.example.config
    <ul>
    <li>WebAppConfig.java</li>
    </ul></li>
    </ul></li>
    </ul></li>
    </ul>
  </blockquote>
  
  <p>I am trying to configure jetty by injecting <code>JettyServerCustomizer</code> as bean in <code>WebAppConfig</code> as following</p>
  
  <pre><code>@Bean
  public JettyServerCustomizer customizeJettyServer()
  {
      return new JettyServerCustomizer()
      {
  
          @Override
          public void customize(final Server server)
          {
              ContextHandler frontEndContext = new ContextHandler();
              frontEndContext.setContextPath(""); //what should be here
              frontEndContext.setResourceBase("");//what should be here
              ResourceHandler frontEndResourceHandler = new ResourceHandler();
              frontEndResourceHandler.setWelcomeFiles(new String[] { "index.html" });
              frontEndContext.setHandler(frontEndResourceHandler);
              ContextHandlerCollection contexts = new ContextHandlerCollection();
              contexts.setHandlers(new Handler[] { frontEndContext});
              server.setHandler(contexts);
          }
      };
  }
  </code></pre>
  
  <p>What value to set to <code>contextPath</code> and <code>ResourceBase</code> so that I could run my index.html which is in front-end module? How the url will looks like?</p>
  
  <p>Thank you :)</p>