webContext +
"/create-reports/list-reports.jsp");
return false;
}
JrxmlFileUploaderClient uploaderClient = new JrxmlFileUploaderClient(cookie, serverURL,
configurationContext);
List<FileItemData> fileItems = fileItemsMap.get("upload");
String errorRedirect = null;
try {
for (FileItemData fileItem : fileItems) {
String filename = getFileName(fileItem.getFileItem().getName());
try {
checkServiceFileExtensionValidity(filename, ALLOWED_FILE_EXTENSIONS);
} catch (FileUploadException e) {
log.error("Failed to validate format of file : " +filename ,e);
throw e;
}
if (!filename.endsWith(".jrxml")) {
throw new CarbonException("File with extension " +
getFileName(fileItem.getFileItem().getName())
+ " is not supported!");
}
String uploadStatue = uploaderClient.uploadJrxmlFile(filename.split(".jrxml")[0], fileItem.getFileItem().getString());
if(uploadStatue.equals("success")){
status=true;
}
response.setContentType("text/html; charset=utf-8");
String msg = "Successfully uploaded jrxml file.";