filename = filename + date;
String mimeType = "text/plain";
ExporterResource ex = (ExporterResource) appContext.getBean("exporterBean");
if (ex != null) {
String solution = requestParams.getStringParameter("solution", null);
String path = requestParams.getStringParameter("path", null);
String action = requestParams.getStringParameter("action", null);
String schedule = requestParams.getStringParameter("schedule", null);
if (schedule != null) {
return;
}
String file = (solution != null ? solution + "/" : "")
+ (path != null ? (path + "/") : "")
+ (action != null ? action : "");
// String exportType = requestParams.getStringParameter("export", null);
String exportType = "XLS";
try {
Thread.currentThread().setContextClassLoader(tempLoader);
Response r = null;
if (exportType == null || "XLS".equals(exportType.toUpperCase())) {
r = ex.exportExcel(file, null, null);
mimeType = "application/vnd.ms-excel";
filename += ".xls";
} else if ("CSV".equals(exportType.toUpperCase())) {
r = ex.exportCsv(file, null, null);
mimeType = "application/csv";
filename += ".csv";
}
setInstanceId(filename);