@@ -0,0 +1,1445 @@
+package com.github.terma.gigaspacesqlconsole;%0A%0Aimport com.github.terma.gigaspacesqlconsole.core.ExecuteRequest;%0Aimport com.google.gson.Gson;%0A%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport java.io.IOException;%0A%0Apublic class ExecuteToCsvServlet extends HttpServlet %7B%0A%0A    private static final String JSON_PARAMETER = %22json%22;%0A    private static final String OCTET_STREAM_CONTENT_TYPE = %22application/octet-stream%22;%0A%0A    private final Gson gson = new Gson();%0A%0A    @Override%0A    protected void doPost(final HttpServletRequest request, final HttpServletResponse response)%0A            throws ServletException, IOException %7B%0A        String requestJson = getRequestJson(request);%0A        final ExecuteRequest req = gson.fromJson(requestJson, ExecuteRequest.class);%0A%0A        response.setContentType(OCTET_STREAM_CONTENT_TYPE);%0A%0A        response.getWriter().append(requestJson);%0A%0A//        try %7B%0A//            doProcess(req, res);%0A//        %7D catch (final Throwable exception) %7B%0A//            response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);%0A//            response.getWriter().append(gson.toJson(new ExecuteException(exception)));%0A//        %7D%0A    %7D%0A%0A    private static String getRequestJson(final HttpServletRequest request) throws IOException %7B%0A        return request.getParameter(JSON_PARAMETER);%0A    %7D%0A%0A%7D%0A

Add execute to csv button on UI and mock servlet