双11狂欢大促

盲盒赢 定制羽绒服

开启惊喜盲盒,抽取你的专属好礼

— 惊喜奖品抢先看 —

struts2 getOutputStream() has already been called for this response

mq2275 mq2275 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
public String execute() throws Exception{
HttpServletResponse response = ServletActionContext.getResponse();
FileInputStream in = new FileInputStream(filePath);
sout = response.getOutputStream();
byte b[] = new byte[1024];
int len = 0;
while ((len = in.read(b)) > 0) {
sout.write(b,0,len);
}
sout.flush();
sout.close();
in.close();
return SUCCESS;
}
...全文

相关推荐

评论 1
收藏 已收藏
分享
返回顶部
mq2275
Web 开发 81,108 成员 341,721 内容