通过 webdav 在基于 Java 的 Web 应用程序中编辑文件(读取/编辑/保存) [英] Edit files (read/edit/save) in java based web application via webdav

查看:31
本文介绍了通过 webdav 在基于 Java 的 Web 应用程序中编辑文件(读取/编辑/保存)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找有关如何在我们基于 servlet 的 Java Web 应用程序中实现服务的信息,该应用程序可以通过 webdav 处理一些常见文件类型的在线编辑(读取/编辑/保存),例如办公套件的程序.我们有一个 tomcat 7 正在运行并使用 webdav 来在客户端计算机上安装文件夹(由同事实现),它工作正常.现在我要求研究实现此在线编辑功能的方法(例如在我们的 webapp 中打开一个 .doc 文件,在 word 中编辑该文件并将其自动保存在我们的 webapp 中)并且找不到关于这个话题.

im searching for informations how to implement a service in our servlet based java web application which can handle online editing (reading / editing / saving) of some common file types like the programs of the office suite via webdav. We have a tomcat 7 running and using webdav already for mounting folders on client computers (implemented by an colleague) which works fine. Now im having the request to research ways to implement this online editing features (for example open a .doc file in our webapp, edit the file in word and save it automaticly in our webapp) and couldn't find that many informations/howtos about this topic.

从我目前所能找到的情况来看,我可以看到使用这个 webdav 功能需要设置一些响应头值,并且需要实现自己的 servlet.但我仍然不确定从哪里开始,如果我是对的......有没有人知道任何好的资源?(文档、简单的 web 应用程序示例,...随便)?

From what i could find so far i could see that using this webdav feature some response header values needs to be set and a own servlet needs to be implemented. But im still not sure where to start and if im right... Does anybody knows any good resoures for this? (documentations, simple webapp example, ...whatever)?

推荐答案

您应该使用 Milton,它完全符合您所描述的目的.它的实现非常简单,您可以创建带注释的方法,使您的 Web 应用程序中的信息可以通过 webdav 获得.这包括文件和文件夹浏览,以及上传、下载和锁定(MS Office 需要)

You should use Milton, its intended for exactly the purpose you describe. Its pretty simple to implement, you create annotatated methods which make the information in your web application available via webdav. This includes file and folder browsing, as well as uploading, downloading and locking (required for MS Office)

milton 网站上有指导您完成实施过程的教程.

There are tutorials on the milton website which guide you through the implementation process.

这是第一个教程中的简单 hello world 实现:https://github.com/miltonio/milton2/blob/master/examples/tuts-anno1/src/main/java/com/helloworld/HelloWorldController.java

Here's a simple hello world implementation from the first tutorial: https://github.com/miltonio/milton2/blob/master/examples/tuts-anno1/src/main/java/com/helloworld/HelloWorldController.java

Milton 随附免费社区版,仅支持 DAV 级别 1.这将适用于大多数 3rd 方 webdav 客户端,如 Bitkinex、Cyber​​duck 等.但为了与操作系统 webdav 客户端(包括 Win7、MacOS、MS Office)兼容,您需要获得商业许可的企业版.

Milton comes with a free community edition which supports DAV level 1 only. That will work with most 3rd party webdav clients like Bitkinex, Cyberduck, etc. But for compatibility with operating system webdav clients, including Win7, MacOS, MS Office, you need the enterprise edition which is available on a commercial license.

详情请参阅米尔顿网站 - http://milton.io

Please see the milton site for details - http://milton.io

(我是作者)

这篇关于通过 webdav 在基于 Java 的 Web 应用程序中编辑文件(读取/编辑/保存)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆