将web页面导出到word文档解决方法

将web页面导出到word文档
如上,我想将web页面(JSP页面)内容导出到word文档(office 07)里面 ,该如何做?
我在网上查了下,有说用POI的,我想问下,如果用jacob能做到嘛?
希望最好给个例子参考参考,感谢!!!

------解决方案--------------------
没弄过,应该很好玩,有空试试

------解决方案--------------------
你是想用代码还是想直接把文章拷先来·
------解决方案--------------------
有两种办法。一种是将你要跳转的结果页面(也就是jsp)的头文件这样设计<%
String fileName = "FAQ知识库.doc";
fileName = new String(fileName.getBytes("GBK"),"ISO8859_1");
response.setHeader("Content-Disposition","attachment;filename="+fileName);
response.setDateHeader("Expires", 0);
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
%> 
<HTML>
2、也就是用poi写到内存的一个临时文档,也就是文件流,再用response。write写出去就可以。
------解决方案--------------------
poi
------解决方案--------------------
值得学习啊
------解决方案--------------------
<%@page contentType="text/html;charset=gb2312"%>
<%
if(request.getParameter("submit")!=null){
response.setContentType("application/msword;charset=gb2312");
}
%>
这是要保存为WORD文档的内容...(不知道为什么连下面的表单代码也给保存进去了)你试试看喽!!
<form action="" method="post">
<input name="submit" type="submit" value="保存为word">
</form>

------解决方案--------------------
直接写 contentType="application/msword"