【java】下载word把word另存为jsp然后上面加上以下代码

来源:互联网 发布:淘宝客服速成 编辑:程序博客网 时间:2024/06/05 08:29
//word 下载防止IE阻止document.getElementsByName('b_download')[0].onclick = function(){window.location = 'printStudentTrainPlanAction.do?studentID=<bean:write name="studentDTO" property="studentID"/>';}word 下载<%@ page contentType="application/msword;charset=GBK" %>下载改下载文件名称<%response.setContentType("application/doc");response.setHeader("Content-Disposition", "inline; filename=\".doc\"");  <%//response.setContentType("application/doc");//String studentno=request.getAttribute("studentNO").toString();String name="学位申请信息登记卡";response.setHeader("Content-Disposition", "inline; filename=\""+studentno+" "+new String( name.getBytes("gb2312"), "ISO8859-1" )+".doc\"");%>%>----------------------------------------------------------------------下载下来的word让他不是以web样式打开在 <w:WordDocument>下面加<w:View>Print</w:View>

原创粉丝点击