rd.include(request, response);
return;
}
}
ReportSessionInfo reportSessionInfo = getReportSessionInfo(report,session,reportPath);
request.setAttribute(AttributeNames.reportSessionInfo,reportSessionInfo);
// check if user has access to this report:
if (report.hasAccess(request)) {
try {
if (request.getParameter(ParameterNames.clearData) != null) {
reportSessionInfo.clearCachedData();
response.sendRedirect(request.getContextPath() + request.getServletPath());
return;
}
if ((request.getParameter(ParameterNames.run) != null) || report.getAllInputs().size() == 0) {
Map<String, List> reportData = reportSessionInfo.runReport(request.getParameterMap());
request.setAttribute(AttributeNames.reportData,reportData);
} else if (reportSessionInfo.isReportWasRunAndDataWasNotCleared()) {
Map<String, List> reportData = reportSessionInfo.runOnlyForNonCachedData();
request.setAttribute(AttributeNames.reportData,reportData);
}
} catch (InvalidInputException e) {
log.info("invalid input exception",e); // should not happen
throw new ServletException(e);