title: Servlet 3.0 file upload (@MultipartConfig) with embedded jetty
body: <p>When using jetty embedded, ie registering a servlet like this:</p>
  
  <pre><code>ServletContextHandler context = new ServletContextHandler(server, "/", false, false);
  
  s = new UploadServlet(jee);
  context.addServlet(new ServletHolder(s), "/upload");
  </code></pre>
  
  <p>Tthe MultipartConfig annotation does not seem to be respected. How do register URL's that support file upload under Servlet 3.0? Reverse engineering the Jetty code reveals it must be something like this, but what is the "multi"???</p>
  
  <pre><code>ServletHolder sh = new ServletHolder(new UploadServlet(jee));
  Object multi;
  sh.getRegistration().setMultipartConfig(new MultipartConfigElement(multi));
  context.addServlet(sh, "/upload");
  </code></pre>