code: @SuppressWarnings("resource")
    static void handleStaticResources(String handler, HttpServletResponse response)
        throws IOException {
      Resource resource = RESOURCES.get(handler);
      if (resource == null) {
        response.sendError(HttpServletResponse.SC_NOT_FOUND);
        return;
      }
      if (resource.getRedirect() != null) {
        response.sendRedirect(resource.getRedirect());
        return;
      }
      response.setContentType(resource.getContentType());
      response.setHeader("Cache-Control", "public; max-age=300");
      try {
        InputStream resourceStream = MapReduceServlet.class.getResourceAsStream(
            "/com/google/appengine/tools/mapreduce/" + resource.getFilename());
        if (resourceStream == null) {
          resourceStream = MapReduceServlet.class.getResourceAsStream(
              "/third_party/java_src/appengine_mapreduce2/static/" + resource.getFilename());
        }
        if (resourceStream == null) {
          throw new RuntimeException("Missing MapReduce static file " + resource.getFilename());
        }
        OutputStream responseStream = response.getOutputStream();
        byte[] buffer = new byte[1024];
        while (true) {
          int bytesRead = resourceStream.read(buffer);
          if (bytesRead < 0) {
            break;
          }
          responseStream.write(buffer, 0, bytesRead);
        }
        responseStream.flush();
      } catch (IOException e) {
        throw new RuntimeException("Couldn't read static file for MapReduce library", e);
      }
    }
docs: Handle serving of static resources (which we do dynamically so users
  only have to add one entry to their web.xml).