I’ve always wanted to have a tinker with WebDAV, but never really had a good excuse to have a look at it. Since I’ve had to get up to speed with Maven, I’ve finally had a reason to get a WebDAV server happening locally for a few developers to share a repository. Turns out that running a WebDAV server on Glassfish (or whatever app server you like) is a snack thanks to the good folk at the WebDAV-Servlet project.
Here’s the steps you need to know:
- Head on over to the downloads page and grab the .war edition
- Unjar the war file and edit /WEB-INF/web.xml. Change the “rootpath” parameter to point to a place on your webserver filesystem where you want to store you WebDAV’d files (eg /data/webdav)
- Rejar the war and deploy
- Point your fave webdav client at your new site
IE works just fine as a WebDAV client if you just want to browse a repository. Select /File/Open… tick the “Open as Web Folder” setting and point it at your freshly installed WebDAV URL.
Once things fire up, you can happily drag and drop to and from the web folder. Works great!
Now I’m doing all this on a small intranet, so my security concerns are pretty low… I would be thinking twice before I installed this sort of stuff on my public facing boxes. But very handy for an internal shared Maven repository…
Props to the WebDAV servlet folks for a very cool little app!