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.
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)?
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)
There are tutorials on the milton website which guide you through the implementation process.
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 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.
Please see the milton site for details - http://milton.io
(I'm the author)