
如果jsp附件是Word文档,如何实现预览功能?我在Internet上搜索的是获取Word文档中的内容,而不是网页中嵌套的Word内容.
?
其他问题:
wangqj写道
response.setContentType(“应用程序/ msword;字符集= GB2312”); //设置为以msword格式输出
我也尝试过jsp美化jsp美化,不.

其他问题:
wangqj写道
这是嵌入在网页中的Word文档吗?为什么不呢?
不,某些机器未安装Word,但是您需要实现预览功能
其他问题:
wangqj写道

这是嵌入在网页中的Word文档吗?为什么不呢?
即使您有一个字. 我的代码如下:
response.setContentType(“应用程序/ msword”);
response.setHeader(“ Content-disposition”,“ inline; filename = test doc.doc”);
response.reset();
response.setContentType(“ text / html; charset = UTF-8”); //解决乱码页面

FileInputStream in = null;
尝试{
in = new FileInputStream(新文件(“ C: /1.doc”));
}捕获(FileNotFoundException e){
// TODO自动生成的捕获块
e.printStackTrace();

}
WordExtractor提取程序= null;
字符串文本= null;
extractor =新的WordExtractor(输入);
text = extractor.getText();
response.getWriter(). 写(文本);
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-162599-1.html
难道那个3年没变样的月饼很好吗
应该说靠本本分分挣钱
即使是后面一条