@Override
    protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws IOException {
        // Get the current request.
        final HttpServletRequest originalRequest = httpServletRequestHolder.get();
        // Set this request.
        httpServletRequestHolder.set(req);

        try {
            final String uuid = req.getParameter(UUID_ARG);
            boolean found = false;
            if (uuid != null) {
                final ResourceKey resourceKey = getRealKey(new ResourceKey(uuid, null));
                if (resourceKey != null) {
                    try {
                        final Path tempFile = resourceStore.getTempFile(resourceKey);
                        if (tempFile != null && Files.isRegularFile(tempFile)) {
                            if (resourceKey.getName().toLowerCase().endsWith(ZIP_EXTENSION)) {
                                resp.setContentType("application/zip");
                            } else {
                                resp.setContentType("application/octet-stream");
                            }
                            resp.getOutputStream().write(Files.readAllBytes(tempFile));
                            found = true;
                        }
                    } finally {
                        deleteTempFile(resourceKey);
                    }
                }
            }

            if (!found) {
                resp.sendError(HttpServletResponse.SC_NOT_FOUND, "Resource not found");
            }
        } finally {
            // Reset current request.
            httpServletRequestHolder.set(originalRequest);
        }
    }
Wrapper for the ResourceStore that makes sure the user can only access stuff
in the session.
stroom-resource/stroom-resource-impl/src/main/java/stroom/resource/impl/SessionResourceStoreImpl.java