throws IOException {
rsp.setContentType("text/json");
rsp.setCharacterEncoding("UTF-8");
QueryProcessor p = processor.get();
OutputFormat format = OutputFormat.JSON;
try {
format = OutputFormat.valueOf(get(req, "format", format.toString()));
} catch (IllegalArgumentException err) {
error(rsp, "invalid format");
return;
}