String documentId = (String)request.getAttribute("documentId");
if (documentId == null)
throw new Exception("Document id missing!!");
logger.debug("Got parameter documentId = " + documentId);
ContentServiceImplSupplier c = new ContentServiceImplSupplier();
Content template = c.readTemplate(profile.getUserUniqueIdentifier().toString(), documentId, null);
String templateFileName = template.getFileName();
logger.debug("Template Read");
if(templateFileName==null){