title: Servlets and static content with JRuby embedded jetty
body: <p>I would like to serve servlets and static content with jetty embedded in JRuby. I tried this:</p>
  
  <pre><code>server = Server.new(8080)
  context = Context.new(server, '/', 0)
  
  context_static = Context.new(server, '/static', 0)
  context_static.setHandler(ResourceHandler.new)
  context_static.setResourceBase('./')
  context_static.setContextPath('/static')
  
  servlet = Servlet.new()
  holder = ServletHolder.new(servlet)
  context.addServlet(holder, '/')
  server.start()
  </code></pre>
  
  <p>The problem is that the <a href="http://localhost:8080/static" rel="nofollow noreferrer">http://localhost:8080/static</a> does not work as exepecte but also shows the content created by the servlet and not the static content. </p>
  
  <p>Regarding the servlet: I first used javax.servlet.http.HttpServlet but then switched to org.mortbay.jetty.servlet.DefaultServlet as that one seems to make the parallel serving possible. I would be greatful for any hints to solve this issue.</p>