<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>indiWiz.com &#187; webdav</title>
	<atom:link href="http://indiwiz.com/tag/webdav/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiwiz.com</link>
	<description>Subhash&#039;s Tech Log</description>
	<lastBuildDate>Wed, 03 Mar 2010 13:24:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mounting WebDav in Ubuntu</title>
		<link>http://indiwiz.com/2009/09/14/mounting-webdav-in-ubuntu/</link>
		<comments>http://indiwiz.com/2009/09/14/mounting-webdav-in-ubuntu/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 14:03:51 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[alfresco]]></category>
		<category><![CDATA[webdav]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=502</guid>
		<description><![CDATA[$ sudo apt-get install davfs2 $ sudo mount -t davfs http://localhost:8080/alfresco/webdav &#60;filesystem_folder&#62;]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><pre>
$ sudo apt-get install davfs2
$ sudo mount -t davfs http://localhost:8080/alfresco/webdav &lt;filesystem_folder&gt;
</pre>
<div class="shr-publisher-502"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/09/14/mounting-webdav-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebDav Client in Java</title>
		<link>http://indiwiz.com/2009/02/11/webdav-client-in-java/</link>
		<comments>http://indiwiz.com/2009/02/11/webdav-client-in-java/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 10:54:17 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jackrabbit]]></category>
		<category><![CDATA[webdav]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=199</guid>
		<description><![CDATA[The history of Java WebDav client is discussed well in this blog: http://pragmaticchris.blogspot.com/2007/11/java-webdav-clients.html. There is one update to it though: the JackRabbit project has a well-defined WebDav client (extending Commons HTTP Client) available. To add JackRabbit WebDav client to your Maven project, use this: I will show one example of using the WebDav client which [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>The history of Java WebDav client is discussed well in this blog: <a href="http://pragmaticchris.blogspot.com/2007/11/java-webdav-clients.html">http://pragmaticchris.blogspot.com/2007/11/java-webdav-clients.html</a>. There is one update to it though: the <a href="http://jackrabbit.apache.org/">JackRabbit project</a> has a <a href="http://wiki.apache.org/jackrabbit/WebDAV">well-defined WebDav client</a> (extending <a href="http://hc.apache.org/httpclient-3.x/">Commons HTTP Client</a>) available.</p>
<p>To add JackRabbit WebDav client to your Maven project, use this:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;dependency&gt;
    &lt;groupId&gt;org.apache.jackrabbit&lt;/groupId&gt;
    &lt;artifactId&gt;jackrabbit-webdav&lt;/artifactId&gt;
    &lt;version&gt;1.6.0&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<p>I will show one example of using the WebDav client which I had developed to upload content to an WebDav server:</p>
<pre class="brush: java; title: ; notranslate">
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
import org.apache.commons.httpclient.methods.RequestEntity;
import org.apache.jackrabbit.webdav.client.methods.PutMethod;

...

// WebDAV URL:
final String baseUrl = ...;
// Source file to upload:
File f = ...;
try{
    HttpClient client = new HttpClient();
    Credentials creds = new UsernamePasswordCredentials(&quot;username&quot;, &quot;password&quot;);
    client.getState().setCredentials(AuthScope.ANY, creds);

    PutMethod method = new PutMethod(baseUrl + &quot;/&quot; + f.getName());
    RequestEntity requestEntity = new InputStreamRequestEntity(
	    new FileInputStream(f));
    method.setRequestEntity(requestEntity);
    client.executeMethod(method);
    System.out.println(method.getStatusCode() + &quot; &quot; + method.getStatusText());
}
catch(HttpException ex){
    // Handle Exception
}
catch(IOException ex){
    // Handle Exception
}
</pre>
<div class="shr-publisher-199"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/02/11/webdav-client-in-java/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Accessing WebDAV From Commandline</title>
		<link>http://indiwiz.com/2008/11/21/accessing-webdav-from-commandline/</link>
		<comments>http://indiwiz.com/2008/11/21/accessing-webdav-from-commandline/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 07:37:08 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[webdav]]></category>

		<guid isPermaLink="false">http://indiwiz.wordpress.com/?p=35</guid>
		<description><![CDATA[Linux has a wonderful commandline tool for accessing WebDAV resources. It is cadaver. To access any resource: $ cadaver http://portale:8080/alfresco/webdav/Web%20Projects If the resource requires authentication, cadaver will prompt for it. Then you may use the standard UNIX and FTP commands for navigating and manipulating content. Some of the common commands are: cd, pwd, ls, put, [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop --><!-- End Shareaholic LikeButtonSetTop --><p>Linux has a wonderful commandline tool for accessing WebDAV resources. It is <tt>cadaver</tt>. To access any resource:</p>
<pre>
$ cadaver http://portale:8080/alfresco/webdav/Web%20Projects
</pre>
<p>If the resource requires authentication, <tt>cadaver</tt> will prompt for it. Then you may use the standard UNIX and FTP commands for navigating and manipulating content. Some of the common commands are: <tt>cd</tt>, <tt>pwd</tt>, <tt>ls</tt>, <tt>put</tt>, <tt>get</tt>, <tt>mput</tt>, <tt>mget</tt>, <tt>less</tt>, <tt>cat</tt> and <tt>delete</tt>. Similar to FTP commands, it has corresponding <i>local</i> commands too: <tt>lcd</tt>, <tt>lpwd</tt> and <tt>lls</tt>.</p>
<h3>Edit In-line</h3>
<p>To edit a file in-line in <tt>cadaver</tt>, just issue the <tt>edit &lt;file-name&gt;</tt> command. The default editor will open the file. To change the editor (to, say, emacs), issue the command: <tt>set editor emacs</tt> from <tt>cadaver</tt> prompt.</p>
<div class="shr-publisher-35"></div><!-- Start Shareaholic LikeButtonSetBottom --><!-- End Shareaholic LikeButtonSetBottom -->]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2008/11/21/accessing-webdav-from-commandline/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

