文件下载中的若干问题之——resultType Stream
公司项目要实现这样一个功能,将查询出来的数据导出为excel表格的形式给用户。这样的功能类似于文件下载。在
最初的jsp页面中,实现下载是这么实现的:
?
?
?
在jsp页面中,有这样一段js
?
?
?
?
?
?
?
?
?
?
Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext.?
Returns:the new BodyContent·返回一个新的BodyContent(代表一个HTML页面的BODY部分内容)
·保存JspWriter实例的对象out
·更新PageContext的out属性的内容?
Returns:the new BodyContent