return mapping.findForward("failed");
}
FileDownloadPageInterceptListener l = (FileDownloadPageInterceptListener) CoreUtil.getPageInterceptListenerById(request
.getSession(), FileDownloadPageInterceptListener.INTERCEPT_ID);
if (l != null) {
DownloadContent download = l.getDownload(Integer.parseInt(id));
if(download == null) {
log.warn("Expected download " + id + " to be available but it wasn't");
return mapping.findForward("failed");
}
else {
download.completeDownload(LogonControllerFactory.getInstance().getSessionInfo(request));
l.removeDownload(download.getId());
if(l.size() == 0) {
CoreUtil.removePageInterceptListener(request.getSession(), l);
}
ActionForward fwd = download.getForward();
if(fwd != null) {
return fwd;
}
}
}