public static void getContent(HttpServletRequest request, HttpServletResponse response, ServletConfig config)
throws Exception {
try {
GadgetResourceServiceClient client = new GadgetResourceServiceClient(config, request.getSession());
String uri = request.getRequestURI();
String path = uri.split("registry/resource")[1];
if (path == null) {
String msg = "Could not get the resource content. Path is not specified.";
log.error(msg);
response.setStatus(400);
return;
}
ContentDownloadBean bean = client.getContentDownloadBean(path);
InputStream contentStream;
if (bean.getContent() != null) {
contentStream = bean.getContent().getInputStream();
} else {