Synchronization of a problem encountered, a few days ago, the customer gave a server address and user name password, let put the above file, download to another server, I checked the next, found that the server using the file protocol is WebDAV, what ghost ... The previously used file protocol is SFTP or FTP ...
This WebDAV is really never heard of, and exposed the knowledge is too narrow, so Baidu has been under, found the relevant information is really not much, but already basic enough.
Then the result is the use of Sardine.jar or Jackrabbit-webdav.jar, and then the relevant code is also pasted in very detailed.
After I have seen, the two methods of comparison, the result is more inclined to sardine, because his writing is relatively simple, the code is less than Jackrabbit-webdav, here I do not paste code, we can see Baidu a bit.
My main problem here is that when using these two technologies, if your JDK version is not 1.7, then you should be able to report the following error, that is, how all the server is not connected to the feeling ... Will get you collapsed, I even tried to jackrabbit-webdav almost all versions, the results prove that no matter which version he jdk1.6 under the run up, only to jdk1.7 above will be normal connection success and read the file.
OK, so, if you encounter the above problem, how wrong, replace the JDK version of it ~ ~
Problems using sardine and Jackrabbit-webdav under jdk1.6