Guidance:
WebDAV is a communication protocol based on HTTP 1.1. It adds some extensions to HTTP 1.1 (that is, some new methods are added in addition to several HTTP standard methods such as get, post, and head ), the application can directly write files to the Web server, lock files when writing files, unlock files after writing, and support version control on files. The emergence of this protocol has greatly increased the value of Web as a creative media for us. Based on WebDAV, You can implement a powerful content management system or configuration management system.
I don't want to introduce the WebDAV protocol in detail here. If you are interested, find the relevant information here:
Http://www.webdav.org
First, you should read this WebDAV FAQ:
Http://www.webdav.org/other/faq.html
WebDAV is a communication protocol similar to HTTP (ietf rfc 2518 ). Similar to HTTP, it requires two software parts: server and client. Currently, WebDAV has a large number of related software implementations.
Here are some software projects related to WebDAV:
Http://www.webdav.org/projects/
Among these projects, we are most interested in open-source projects implemented in Java. Slide is one of the most important projects. Slide is a sub-project of the Jakarta Project (also Apache mountain). It provides a set of WebDAV server-side and client-side development libraries and APIs, and has now been released to version 2.0.
Http://jakarta.apache.org/slide/
Download the latest slide 2.0 binary package here.
Http://jakarta.apache.org/site/binindex.cgi
Slide is divided into two parts: server and client:
Server:
Http://apache.linuxforum.net/dist/jakarta/slide/binaries/jakarta-slide-server-bin-2.0.zip
Client:
Http://apache.linuxforum.net/dist/jakarta/slide/binaries/jakarta-slide-webdavclient-bin-2.0.zip
Let's talk about how to configure the server:
Decompress, assuming under D:/tmp/jakarta-slide-server-2.0, you will
D:/tmp/jakarta-slide-server-2.0/slide/webapp/
Find two war files:
Slide. War: The slide server configuration, which is implemented using Servlet.
Slide-doc.war: slide document.
Copy the two war files to the deployment directory (generally webapps directory) of your Web Container (tomcat, Jetty, resin, etc.), and restart Web container.
In the document I am writing, the server configuration is so simple.
Let's talk about how to configure it on the client.
WebDAV has many clients. Using the library of the slide client, you can easily write a webDAV client program. If you are interested, please refer to this document:
Http://www.onjava.com/lpt/a/4387
I will mainly talk about how to use the Web Folder feature provided by Windows 2000/XP to access web folders.
After Windows 2000/XP is installed, you can access web folders Based on the WebDAV protocol, map web folders to a local folder, and support drag-and-drop, copy/paste, and other functions, it is very convenient to use.
To add a web folder in Windows 2000/XP, follow these steps:
Open "Network neighbors", add network neighbors, and enter the URL of the web folder in "Enter the location of network neighbors". For example, the WebDAV server configured with slide is:
Http: // localhost: 8000/slide/
Then follow the wizard prompts to continue. It is very simple.
After configuration, you can use this web folder as a local folder. Drag a few files and try again. For the preceding Web Folder configuration, refer to these documents:
Http://chapters.marssociety.org/webdav/
(A few documents written by cool, who are idle and tirelessly studying how humans migrate to Mars)
There are also related documents on the M $ Website:
Http://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp? Url =/WindowsXP/home/using/productdoc/en/using_webfolders_for_file_transfer.asp
Many m$ products have built-in support for WebDAV. For example, Office 2000, ie 5/6, Exchange Server, and FrontPage. After configuring the WebDAV server, When I access this URL
Http: // localhost: 8000/slide/files/23.doc
Word 2000 can recognize that the Web server supports the WebDAV protocol. Therefore, Word 2000 can directly edit this document on the server and save it on the Web server after editing. Is this more convenient than downloading-& gt; modify-& gt; upload you are used?
WebDAV has many other topics. For example, WebDAV can completely replace FTP. WebDAV has an overwhelming advantage over FTP in at least the following aspects:
1. You need to apply for an operating system account for FTP. WebDAV does not need to apply for any operating system account. It uses a set of secure and complete authentication mechanisms.
2. All FTP data (including logon information) is transmitted in plain text. Encryption must be implemented by yourself. For example, you can use GPG to do this manually, but it is inconvenient after all. WebDAV can be used to transmit data over HTTPS. encryption and decryption are completed automatically at the lower layer.
3. FTP data transmission efficiency is relatively low. A new TCP connection is required for each file to be transmitted, while WebDAV only needs one TCP connection for all files to be transmitted.
4. FTP is not as easy as HTTP to traverse the firewall, and its application scope in the Wan is much smaller than that in HTTP. Because WebDAV is based on HTTP, it has all the advantages of HTTP.
5. the FTP client tool does not have the webDAV client tool for ease of use. You have seen that after the WebDAV server is configured, accessing the web folder in Windows 2000/XP Web Folder mode is not much different from accessing the local folder. If the application supports the WebDAV protocol (for example, Word 2000), you can directly open and edit files in the web folder and save them in the original web folder. This is exactly the same as samba. Do you know which FTP client is so convenient to use?
More about WebDAV.
Just for fun!
This article is transferred from
Http://www.javaeye.com/topic/6568