We have a browser based application which integrates a webdav server. We generate URLs to specific documents on our (webdav) servlet. (https://server.com/webdav/path/to/file.doc
)
What we are looking for is a good way for our clients to open these links directly in the appropriate program. I.E. for a windows user, "https://server.com/webdav/path/to/excelfile.xls
" should open in MS Excel, while the same link should open OOCalc on Linux.
So far, we've been using a small applet which maps has extensions, OS's, and programs and opens the program through Runtime.getRuntime().exec(..)
. This approach works somewhat ok on Ms-Windows but is problematic on Linux and mac clients and is also quite inflexible.
If any one know a better way of doing this, it would be much appreciated.