I recently developed a simple Webdav server using the Apache Tomcat WebdavServlet as a base. I just got the source from SVN (see below) and modified it to meet my needs. You can add code to the different methods in there:
doGet
doLock
doPut
doUnlock
etc...
I am using it as a poor mans webdav in front of an enterprise CMS, so within each method I added API calls to fetch the document, lock it, version it, or whatever. Basically they didn't want to buy the webdav product from the vendor, and Tomcat is free.
As for opening the Office files on the client, you may need to rely on a library that ships with Office installs (since Office XP at least). Note that the component is called SharePoint blah blah but it does not require a SharePoint install anywhere. I have a js snippet here that uses the library for an example, obviously you would modify to meet your needs. I realize you said no ActiveX, but without it I am not 100% sure how you would open the links. You're welcome to try other ways.
function webedit(id) {
if (window.ActiveXObject) {
var ed;
try {
//Office 2003
ed = new ActiveXObject('SharePoint.OpenDocuments.2');
} catch (err1) {
try {
//Office 2000/XP
ed = new ActiveXObject('SharePoint.OpenDocuments.1');
} catch (err2) {
try {
//Office 2007
ed = new ActiveXObject('SharePoint.OpenDocuments.3');
} catch (err3) {
window.alert('Unable to create an ActiveX object to open the document. This is most likely because of the security settings for your browser.');
return false;
}
}
}
if (ed) {
ed.EditDocument('<%=webdavPath%>/webdav/'+id);
return false;
} else {
window.alert('Cannot instantiate the required ActiveX control to open the document. This is most likely because you do not have Office installed or you have an older version of Office.');
return false;
}
} else {
window.alert('Internet Explorer is required to use this feature.');
}
return false;
}
I also realize that your server is IIS and not Apache-based, but you can always front the Tomcat install with IIS (it's what we do) and use the JK ISAPI filter over AJP. Anyway, it's one way of doing things and doesn't require you to purchase anything.
SVN source: http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/org/apache/catalina/servlets/WebdavServlet.java
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…