Skip to content

Commit bdc5b8e

Browse files
committed
6.3.9561
1 parent 92143fc commit bdc5b8e

File tree

129 files changed

+10069
-102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+10069
-102
lines changed

Java/android/androidfsstorage/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
jarJar {
3535
rules = [
3636
'stax-api-1.0.1.jar' : 'javax.xml.** com.ithit.webdav.xml.@1',
37-
'webdav-server-6.3.9510-Beta.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
37+
'webdav-server-6.3.9561.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
3838
]
3939
}
4040

@@ -75,11 +75,11 @@ dependencies {
7575
implementation 'commons-io:commons-io:2.7'
7676
implementation 'com.google.code.gson:gson:2.8.9'
7777
implementation 'com.android.support:appcompat-v7:27.1.1'
78-
implementation('com.ithit.webdav.integration:android-integration:6.3.9510-Beta', {
78+
implementation('com.ithit.webdav.integration:android-integration:6.3.9561', {
7979
exclude group: 'org.nanohttpd', module: 'nanohttpd'
8080
})
8181
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
8282
jarJar 'stax:stax-api:1.0.1'
83-
jarJar 'com.ithit.webdav:webdav-server:6.3.9510-Beta'
83+
jarJar 'com.ithit.webdav:webdav-server:6.3.9561'
8484
testImplementation 'junit:junit:4.12'
8585
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
2+
<h1 class="d-xl-block d-none">WebDAV Server Example with Collection Synchronization support</h1>
3+
<p><span>This sample&nbsp;is a fully functional Class 2 WebDAV server that stores all data in the file system. It supports collection synchronization as per RFC 6578. The&nbsp;<a title="AJAX Library" href="https://www.webdavsystem.com/ajax/">IT Hit WebDAV Ajax Library</a>&nbsp;is used to display and browse server content on a default web page as well as to open documents for editing from a web page and save back directly to the server. It is provided in Java and Kotlin, with identical functionality.</span></p>
4+
<h2>Requirements</h2>
5+
<ul>
6+
<li>Java 1.8.</li>
7+
<li>Apache Tomcat 7.0+ or GlassFish v4.1.1+ or&nbsp;WebLogic 12c+ or JBoss WildFly 9+ or WebSphere&nbsp;16.0.0.2+.</li>
8+
<li>Windows OS</li>
9+
<li>NTFS</li>
10+
</ul>
11+
<p>You will also need the&nbsp;<a title="AJAX Library" href="https://www.webdavsystem.com/ajax/">IT Hit WebDAV Ajax Library</a>&nbsp;to display JavaScript UI on a default web page. You can install it from NPM using NPM command line tool, see below. Node.js is <strong>ONLY</strong> required to download the JavaScript files used in the project. Node.js is <strong>NOT</strong> required to run the server.</p>
12+
<h2>Running the sample</h2>
13+
<ol>
14+
<li><strong>Set license.</strong>&nbsp;Download your license file&nbsp;<a href="https://www.webdavsystem.com/javaserver/download/">here</a>. To set the license, edit the 'license' section in \collectionsync<em>\WEB-INF\web.xml</em>&nbsp;and specify the path to the&nbsp;<em>license.lic</em>&nbsp;file. <br>
15+
<pre class="brush:xml;auto-links:false;toolbar:false">&lt;init-param&gt;
16+
&lt;param-name&gt;license&lt;/param-name&gt;
17+
&lt;param-value&gt;C:\License.lic&lt;/param-value&gt;
18+
&lt;/init-param&gt;</pre>
19+
The IT Hit Java WebDAV Server Library is fully functional and does not have any limitations. However, the trial period is limited to 1 month. After the trial period expires the Java WebDAV Server will stop working.</li>
20+
<li><strong>Download the IT Hit WebDAV Ajax Library.</strong>&nbsp;You can do this with NPM command-line tool, which is included with Node.js.&nbsp;Install the&nbsp;<a href="https://nodejs.org/en/download/">Node.js</a>&nbsp;and navigate to&nbsp;<code class="code">\collectionsync\WEB-INF\wwwroot\js\</code>&nbsp;folder. Run:&nbsp;
21+
<pre class="brush:html;auto-links:false;toolbar:false">npm install&nbsp;webdav.client</pre>
22+
This will download IT Hit WebDAV Ajax Library files into your project. Note that Node.js itself is <strong>NOT</strong> required to run the server, it is used <strong>ONLY</strong> to install the required JavaScript files.</li>
23+
<li><strong>Configure the storage folder.</strong> By default, this sample publishes documents from the <code class="code">WEB-INF/Storage</code>&nbsp;folder. For the sake of configuration simplicity, documents are extracted from project resources during the first run. You can publish documents from any other folder specifying a path in the 'root' section in&nbsp;<code class="code">web.xml</code>:<br>
24+
<pre class="brush:xml;auto-links:false;toolbar:false">&lt;init-param&gt;
25+
&lt;param-name&gt;root&lt;/param-name&gt;
26+
&lt;param-value&gt;C:\Storage\&lt;/param-value&gt;
27+
&lt;/init-param&gt;</pre>
28+
</li>
29+
<li><strong>Configure the application server.</strong>&nbsp;Here we will configure WebDAV server to run on the website root (<code class="code">http://server.com/</code>). <span class="warn"><strong>Note:</strong> While you can configure WebDAV server to run on site non-root (for instance on&nbsp;<code class="code">http://server.com/webdavroot/</code>) some WebDAV clients (such as some old versions or Mini-redirector, Microsoft Web Folders and MS Office 2007 and earlier) will fail to connect to non-root server. They submit configuration requests to server root and if they do not get the response they will not be able to connect.&nbsp;See also&nbsp;<a title="Working with MS Office" href="https://www.webdavsystem.com/javaserver/doc/ms_office_read_only/">Making Microsoft Office to Work with WebDAV Server</a> and&nbsp;<a title="Opening Docs" href="https://www.webdavsystem.com/ajax/programming/open-doc-webpage/opening_ms_office_docs/">Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page</a>.</span>
30+
<ul>
31+
<li><strong>In the case of Tomcat:</strong><br>Copy&nbsp;<em>\collectionsync</em>&nbsp;folder to&nbsp;<em>&lt;Your Tomcat location&gt;\Tomcat x.x\webapps</em>&nbsp;folder. Add the following lines under the &lt;Host&gt; tag in&nbsp;<em>&lt;Your Tomcat location&gt;</em><em>\Tomcat x.x\conf\server.xml</em>:<br>
32+
<pre class="brush:csharp;auto-links:false;toolbar:false">&lt;Context path="" debug="0" docBase="collectionsync"&gt;
33+
&lt;/Context&gt;</pre>
34+
<p><span>To see if your server is running type the root URL of your WebDAV site in a browser and you will see the list of folders. Now&nbsp;</span><a href="https://www.webdavsystem.com/server/access/">connect to the server with any WebDAV client</a><span>.</span></p>
35+
<p>If you experience any problems examine the log created by tomcat:&nbsp;<code class="code">&lt;Your Tomcat location&gt;\Tomcat x.x\logs\localhost.xxxx-xx-xx.log</code>.</p>
36+
</li>
37+
<li><strong>In the case of Glassfish:</strong><ol type="a">
38+
<li>Deploy the collectionsync application.
39+
<p>From the main tree (<em>Common Tasks</em>)&nbsp;goto&nbsp;<em>Applications</em>.</p>
40+
<p>Press&nbsp;<em>Deploy</em>&nbsp;and specify following properties:</p>
41+
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Local Packaged File or Directory That Is Accessible from the Enterprise Server = &lt;path to collectionsync directory&gt;</p>
42+
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Type = Web Application</p>
43+
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Context Root = /</p>
44+
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note:&nbsp;sample can be deployed to a non-root context, but some clients work only with servers deployed to root the context.</p>
45+
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- Application Name =&nbsp;collectionsync</p>
46+
</li>
47+
<li>Launch the sample.
48+
<p>From the main tree (<em>Common Tasks</em>)&nbsp;go to&nbsp;<em>Applications</em>.</p>
49+
<p>Press&nbsp;<em>Launch</em>&nbsp;on collectionsync&nbsp;application.</p>
50+
<p>If everything was set up properly you should see a sample page with a list of sample files and folders. Now&nbsp;<a href="https://www.webdavsystem.com/server/access/">connect to the server with any WebDAV client</a>.</p>
51+
<p>If anything goes wrong please consult log usually located at&nbsp;<em>&lt;GLASSFISH_INSTANCE_ROOT&gt;/logs/server.log.</em></p>
52+
</li>
53+
</ol></li>
54+
<li><strong>In the case of JBoss WildFly:</strong><ol type="a">
55+
<li>By default WildFly restricts access to certain packages from Java SDK. So you need to allow&nbsp;<strong>com.sun.nio.file</strong>&nbsp;package in the&nbsp;<strong>sun/jdk&nbsp;</strong>module by adding the following line in the&nbsp;module.xml&nbsp;file:
56+
<pre class="brush:xml;auto-links:false;toolbar:false">&lt;path name="com/sun/nio/file"/&gt;</pre>
57+
<p>Restart WildFly.</p>
58+
</li>
59+
<li>Deploy the collectionsync application.
60+
<p>Create folder collectionsync<em>.war </em>under&nbsp;<em><em>&lt;WILDFLY_ROOT&gt;/deployments.</em></em></p>
61+
<p>Copy content of <em>samples/collectionsync&nbsp;</em>to&nbsp;<em><em><em>&lt;<em><em>WILDFLY_ROOT</em></em>&gt;/deployments/collectionsync<em>.war.</em></em></em></em></p>
62+
<p>Create file&nbsp;collectionsync<em>.war.dodeploy in&nbsp;<em><em>&lt;<em><em>WILDFLY_ROOT</em></em>&gt;/deployments/collectionsync<em>.war.</em></em></em></em></p>
63+
<p><span>If everything was set up properly you should see a sample page on the WildFly root context with a list of sample files and folders. Now&nbsp;</span><a href="https://www.webdavsystem.com/server/access/">connect to the server with any WebDAV client</a><span>.</span></p>
64+
<p>If anything goes wrong please consult log usually located at&nbsp;<em>&lt;<em><em>WILDFLY_ROOT</em></em>&gt;/log/server.log.</em></p>
65+
</li>
66+
</ol></li>
67+
</ul>
68+
</li>
69+
</ol>
70+
<h2>The Project&nbsp;Classes</h2>
71+
<p>On the diagram below you can see the classes in the WebDAV Collectionsyncproject:</p>
72+
<p><img id="__mcenew" alt="" src="https://www.webdavsystem.com/media/2195/syncdiagram.png" rel="124998"></p>
73+
<p>To adapt the sample to your needs, you will modify these classes to read and write data from and into your storage. You can find more about this in&nbsp;<a title="Creating WebDAV Server" href="https://www.webdavsystem.com/javaserver/doc/">Creating a Class 1 WebDAV Server</a>&nbsp;and&nbsp;<a title="Class 2 / 3 Server" href="https://www.webdavsystem.com/javaserver/doc/create_class_2_webdav_server/">Creating Class 2 WebDAV Server</a>&nbsp;article as well as in the&nbsp;<a href="http://java.webdavsystem.com/">class reference documentation</a>.</p>
74+
<p>&nbsp;</p>
75+
<h3>See Also:</h3>
76+
<ul>
77+
<li><a title="Running" href="https://www.webdavsystem.com/javaserver/server_examples/running_webdav_samples/">Running the WebDAV Samples</a></li>
78+
<li><a title="Troubleshooting" href="https://www.webdavsystem.com/javaserver/server_examples/troubleshooting/">WebDAV Server Samples Problems and Troubleshooting</a></li>
79+
<li><a title="Creating WebDAV Server" href="https://www.webdavsystem.com/javaserver/doc/">Creating a Class 1 WebDAV Server</a>&nbsp;</li>
80+
<li><a title="Class 2 / 3 Server" href="https://www.webdavsystem.com/javaserver/doc/create_class_2_webdav_server/">Creating a Class 2 WebDAV Server</a></li>
81+
</ul>
82+
<p>&nbsp;</p>
83+
<p class="p1" style='color: rgba(0, 0, 0, 0.85); line-height: normal; font-family: ".SF NS"; font-size: 26px; margin-bottom: 0px; margin-left: 0px; font-stretch: normal; font-feature-settings: normal; font-variant-numeric: normal; font-variant-east-asian: normal; font-variant-alternates: normal; font-kerning: auto; font-optical-sizing: auto; font-variation-settings: normal;'>collectionsync</p>
84+
<h3 class="para d-inline next-article-heading">Next Article:</h3>
85+
<a title="Java WebDAV Server for Android" href="https://www.webdavsystem.com/javaserver/server_examples/android/">Java WebDAV Server Example for Android</a>
86+

0 commit comments

Comments
 (0)