HttpServletRequest request,
HttpServletResponse response) throws IOException {
try {
Long attachmentId = Long.valueOf(request.getParameter("attachmentId"));
// retrieve att
Attachment att = getBusinessObjectService().findBySinglePrimaryKey(
Attachment.class, attachmentId);
if (att == null) {
log.error("no attachment was found with id '" + attachmentId + "'");
} else {
downloadAttachmentAsStream(response, att);