1.下载安装vmware虚拟机

2.下载windows server 2012或者window server 2012 R2的iso镜像

http://www.xp85.com/html/Windows2012.html

3.安装windows server 2012到虚拟机,作为系统1

http://jingyan.baidu.com/article/ce436649deb7733772afd37c.html

4.再次安装一个windows server2012到虚拟机,作为系统2.

5.阅读并理解以下文章

http://www.cnblogs.com/lovechengcheng/p/4117391.html
http://www.cnblogs.com/poissonnotes/p/3238238.html

系统1作为转换服务器,系统2作为域控服务器,并分别按照以上文章的需求部署相关服务。

例如系统1的计算机名为rcw,系统2的域名为job001.com。

则office server app的服务地址为:

http://rcw.job001.com

6.参照以下文章的使用实例

http://www.cnblogs.com/yanweidie/p/4516164.html

7.在系统1即转换服务器上安装JDK和tomcat

在tomcat的webapps\template目录下放置一篇测试文档test.doc,启动tomcat.

打开office server apps的页面:

http://rcw.job001.com

点击create link 即可生成文档预览网址,复制网址到另外一个标签页即可预览

8.页面和后台控制层:
package cn.rcw.index.controller;

@Controller
@RequestMapping("/index")
public class IndexController{

  @RequestMapping("/viewDoc")
  public String viewDoc(Model model){
   //在线预览服务地址
   var strOfficeApps="https://rcw.job001.com";
   //文档地址,需要外网能访问
   var strFileUrl="http://localhost:8080/test/webapp/test.docx";
   var strUrl =strOfficeApps+"/op/embed.aspx/src="+encodeURIComponent(strFileUrl);
  }

  model.addAttribute("docUrl",strUrl);
  return "/test/test.html";
}

页面:

<!doctype html>
<html lang="zh_CN">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
在线预览文档:
<iframe id="iframeName" name="iframeName" style="margin:0 auto; width: 900px;height: 700px;" src='${docUrl}'></iframe>
</body>
</html>

感谢以上转载博客的作者,在此不一一列出,谢谢

java web整合office web apps的更多相关文章

  1. 如何整合Office Web Apps至自己开发的系统(一)

    在前面我的一篇博客中 Office Web Apps安装部署(一),有一张介绍Office Web Apps与其他系统的关系图,   从上述图中,可知实际上Office Web Apps也是可以接入自 ...

  2. 如何整合Office Web Apps至自己开发的系统(二)

    WOPI项目的创建 首先用vs2012创建一个mvc4的程序.如图: 从上一篇我们可以知道,WOPI通讯主要通过两个服务: 一个是CheckFileInfo服务, 一个是GetFile服务. 所以下面 ...

  3. 整合Office Web Apps至自己的开发系统

    原文出处:http://www.cnblogs.com/poissonnotes/p/3267190.html 还可参考:https://www.cnblogs.com/majiang/p/36729 ...

  4. office web apps 整合Java web项目

    之前两篇文章将服务器安装好了,项目主要的就是这么讲其整合到我们的项目中,网上大部分都是asp.net的,很少有介绍Java如何整合的,经过百度,终于将其整合到了我的项目中. 首先建个servlet拦截 ...

  5. Asp.net与office web apps的整合

    其实网上有关office web app的整合已经有相关的文章了,典型的是如何整合Office Web Apps至自己开发的系统(一) 和如何整合Office Web Apps至自己开发的系统(二), ...

  6. Exchange 2013与 Office Web Apps 整合

    好久没写什么新文章了,这里有关Office Web Apps 的部署我就省略了,只是在创建web场我一般 会创建2个url, 如: New-OfficeWebAppsFarm -InternalUrl ...

  7. office web apps 整合到自己项目中(wopi实现在线预览编辑)

    借助office web apps实现在线预览和在线编辑 我所有的代码都是用go语言编写,你可以直接编译后使用,不用再有其他的操作. 最近项目实在太忙,这几天才有时间,这次是重头戏,要好好琢磨一下怎么 ...

  8. 一、office web apps 部署

    原文出处:http://www.cnblogs.com/yanweidie/p/4516164.html 原文出处:https://www.cnblogs.com/poissonnotes/p/323 ...

  9. 在线文档预览方案-office web apps续篇

    上一篇在线文档预览方案-office web apps发布后收到很多网友的留言提问,所以准备再写一篇,一来介绍一下域控服务器安装,总结一下大家问的多的问题,二来宣传预览服务安装与技术支持的事情. 阅读 ...

随机推荐

  1. linux下ssh无法连接的原因

    在虚拟机上安装了ubuntu16.04 server,用本机 ssh 连接的时候 无法连接上: 忽然想起在安装的时候有个openssh好像没有勾选,所以在虚拟机上 apt install openss ...

  2. SQL Server 2008 开启远程连接

    除了 IP1.IP2 外,也要把 IPALL 的端口也设置为 1433 参考:SQL Server开启1433端口,彻底解决方案

  3. LitJson的用法

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...

  4. 在idea中设置记住git的用户名和密码

    在idea中设置记住git的用户名和密码 1.在项目根目录下执行以下git命令: git config --global credential.helper store 2.执行上述命令后,在idea ...

  5. 在一般类中通过XmlWebApplicationContext对象获取应用部署上下文Context

    XmlWebApplicationContext xwac = (XmlWebApplicationContext) ContextLoader.getCurrentWebApplicationCon ...

  6. AIM Tech Round 4 Div. 1

    A:显然最优方案是对所形成的置换的每个循环排个序. #include<iostream> #include<cstdio> #include<cmath> #inc ...

  7. Java json转model

    前面有一篇关于  json的转换类的工具:http://blog.csdn.net/hanjun0612/article/details/77891569 但是有一个情况. 由于java需要属性小写开 ...

  8. STL的一些基本操作

    STL是一个神奇的东西,在NOIP考试中非常重要. 什么是STL? STL(Standard Template Library),即标准模板库,是一个具有工业强度的,高效的C++程序库.它被容纳于C+ ...

  9. github 快速部署

    在github上 新建一个项目后,并且未提交任何代码,会有一个页面提示我们如何快速部署.在此备份一下那个页面 Quick setup — if you’ve done this kind of thi ...

  10. npm 淘宝源

    --------- npm: 淘宝源设置:npm config set registry https://registry.npm.taobao.org