Hi All,
My requirement is below:
1. Create a report.
2. Report has export to excel button.
3. On button , i m calling generateexcel method. it create a excel file and keep in folder in application server not repostiory.
4. Problem , how can i send that file to client browse like , whenever we download the file from internet it show a dialog box. and after i have to delete the same file from the application server.
for this requirement i have used blow code :
File tempFile = new File(tempDir+strReportName);
HttpTransportManager manager = HttpTransportManager.getManager();
ArrayList<String> ids = new ArrayList<String>(1);
com.documentum.web.contentxfer.http.HttpTransportManager.Content content = new com.documentum.web.contentxfer.http.HttpTransportManager.Content(tempFile);
ids.add(manager.addOutgoing(content));
String contextPath = ((HttpServletRequest)getPageContext().getRequest()).getContextPath();
manager.setClientDownloadEvent(ids, getTopForm(), contextPath);
tempFile.deleteOnExit()
But still unable to downaload the report files.
Thanks in Advance
Ram