public void export(@PathVariable String wsName, HttpServletResponse response) throws Exception {
Catalog cat = geoServer.getCatalog();
WorkspaceInfo ws = findWorkspace(wsName, cat);
BundleExporter exporter = new BundleExporter(cat, new ExportOpts(ws));
exporter.run();
Path zip = exporter.zip();
response.setContentType(APPLICATION_ZIP_VALUE);
response.setHeader("Content-Disposition", "attachment; filename=\""+zip.getFileName()+"\"");