@Override
    public void handle(String pathInContext, Request baseRequest,
                       HttpServletRequest request, HttpServletResponse response) throws IOException {
        // Get the resource.
        URL path = ResourcesResponseHandler.class.getResource(_testContext + pathInContext);
        if (path == null) {
            response.sendError(HttpServletResponse.SC_NOT_FOUND, "Resource not found: " + pathInContext);
            return;
        }

        try {
            File file = new File(path.getFile());
            byte[] bytes = new byte[(int) file.length()];
            @SuppressWarnings("resource")
            DataInputStream in = new DataInputStream(new FileInputStream(file));
            in.readFully(bytes);

            response.setContentLength(bytes.length);
            if (file.getName().endsWith(".png")) {
                response.setContentType("image/png");
            } else {
                response.setContentType("text/html");
            }
            response.setStatus(200);

            OutputStream os = response.getOutputStream();
            os.write(bytes);
        } catch (Exception e) {
            response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
        }
    }
Create an HTTP response handler that sends data back from files on the
classpath TODO KKr - use regular Jetty support for this, via setting up
HttpContext
crawler-commons/src/test/java/achecrawler/crawler/crawlercommons/test/ResourcesResponseHandler.java