Just to complete the Java code, I don’t know if things have changed in 9.9 but you need to use a URL (and getExportFileName needs a return type, of course):
public String downloadLink_action() {
try
{
URL url = new URL("https://hostname/download/15082709015510867de0383b6a4d02ae/");
boolean forceDownload = true; //false to allow the browser to display the content
URLContentExportBean exportBean = new URLContentExportBean(url, forceDownload) {
/**
* Override to change the filename that is sent to the client
* @return
*/
@Override
public String getExportFileName() {
return "my_custom_filename_here";
}
};
streamFileDataToResponse(exportBean);
} catch (Exception e) {
error(e);
}
return null;
}
I also set forceDownload to true, as that seemed to be closer to the original problem.
One last thing - while this works fine for a Command Link/Button/whatever, it does render the page unusable. Is there any way to send the file and leave the page still working?
#webMethods-BPMS#webMethods#MWS-CAF-Task-Engine