|
在.J文件调用action去下载指定文件。解决会把.J文件给下载下来。请问是什么原因?action方法
- public static InputStream test() throws IOException{
- String path =com.justep.common.SystemUtils.getHome(null)+"/excel/";
- String excelName = "xxxx模板.xlsx";
- InputStream in = new FileInputStream(path+excelName); // 获取下载文件的输入流
- return in;
- }
复制代码 .J调用
- Action action = new Action();
- action.setProcess("/demo/actions/process/integration/integrationProcess");
- action.setActivity("staticActivity2");
- action.setName("test");
- String bSessionID = "5B66B4A81C4C5CC4BAFBC10B8A16352F";
- ActionEngine.invokeAction(action, ActionUtils.BINARY_CONTENT_TYPE, bSessionID, null, new StreamCallback(response));
复制代码
|
|