From 28b0a617193555d2b02d77f18ab8c793460247a1 Mon Sep 17 00:00:00 2001 From: IT Hit Date: Tue, 13 Feb 2024 16:05:11 +0200 Subject: [PATCH] 7.0.10355 --- Java/android/androidfsstorage/README.md | 25 +++- Java/jakarta/collectionsync/README.md | 88 ++++++++++- Java/jakarta/collectionsync/pom.xml | 2 +- Java/jakarta/filesystemstorage/README.md | 86 ++++++++++- Java/jakarta/filesystemstorage/pom.xml | 2 +- Java/jakarta/springboot3fsstorage/README.md | 1 - Java/javax/collectionsync/README.md | 88 ++++++++++- Java/javax/collectionsync/pom.xml | 2 +- Java/javax/deltav/README.md | 107 +++++++++++++- Java/javax/deltav/pom.xml | 2 +- Java/javax/filesystemstorage/README.md | 86 ++++++++++- Java/javax/filesystemstorage/pom.xml | 2 +- Java/javax/oraclestorage/README.md | 104 ++++++++++++- Java/javax/oraclestorage/pom.xml | 2 +- Java/javax/springbootfsstorage/README.md | 1 - Java/javax/springbootoraclestorage/README.md | 45 +++++- Java/javax/springboots3storage/README.md | 61 +++++++- Kotlin/javax/filesystemstorage/README.md | 86 ++++++++++- Kotlin/javax/filesystemstorage/pom.xml | 4 +- README.md | 148 ++++++++++++++++++- 20 files changed, 921 insertions(+), 21 deletions(-) diff --git a/Java/android/androidfsstorage/README.md b/Java/android/androidfsstorage/README.md index 46b134b..feeb4e3 100644 --- a/Java/android/androidfsstorage/README.md +++ b/Java/android/androidfsstorage/README.md @@ -1 +1,24 @@ -ÿþ \ No newline at end of file + +

Java WebDAV Server Example for Android

+

This sample is a Class 2 WebDAV server that runs on Android. It uses modified NanoHTTPD as an application server and publishes files from a mobile application folder or from media folder. Locks and properties in SQLite database.

+

To see the documents a user opens a sample web page served by this server sample in a web browser on any machine in the local network. A user can open, edit and save documents back to the device as well as a user can upload, download and manage documents using any WebDAV client.

+

Requirements

+ +

Setting the License

+

To run the example, you will need a valid IT Hit WebDAV Server Engine License. You can download the license in the product download area. Note that the Engine is fully functional with a trial license and does not have any limitations. The trial license is valid for one month and the engine will stop working after this. You can check the expiration date inside the license file. Download the license file and specify it's content in License field under DavEngineOptions in /androidfsstorage/app/src/main/assets/webdavsettings.json file.

+

You can also run the sample without explicitly specifying a license for 5 days. In this case the Engine will automatically request the trial license from IT Hit website https://www.webdavsystem.com. Make sure it is accessible via firewalls, if any. After 5 days the Engine will stop working. To extend the trial period you will need to download a license in a product download area and specify it in webdavsettings.json

+

Accessing files via WebDAV

+

By default your server runs on port 8181. After running the application on Android you will see the following screen with the instructions about ho to connect:

+

Connection instructions are displayed when you run the Android WebDAV Server.

+

Open a web browser on any machine on the network and navigate to the WebDAV server. 

+

See Also:

+ +

 

+

 

+

Next Article:

+WebDAV Server Example with Versioning, Java diff --git a/Java/jakarta/collectionsync/README.md b/Java/jakarta/collectionsync/README.md index 46b134b..7dfcc81 100644 --- a/Java/jakarta/collectionsync/README.md +++ b/Java/jakarta/collectionsync/README.md @@ -1 +1,87 @@ -ÿþ \ No newline at end of file + +

WebDAV Server Example with Collection Synchronization Support

+

This sample is a fully functional Class 2 WebDAV server with collection synchronization support (RFC 6578) that stores all data in the file system. This sample is similar to what is provided by the Java demo WebDAV server at: https://webdavserver.com 

+

To access this sample server and test synchronization you can use the WebDAV Drive sample for Windows and macOS.

+

This sample can be downloaded in the product download area as well as it is published on GitHub. It is available for both jakarta and javax.

+

Requirements

+ +

You will also need the IT Hit WebDAV Ajax Library 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 ONLY required to download the JavaScript files used in the project. Node.js is NOT required to run the server.

+

Running the sample

+
    +
  1. Set license. Download your license file here. To set the license, edit the 'license' section in \collectionsync\WEB-INF\web.xml and specify the path to the license.lic file.
    +
    <init-param>
    +<param-name>license</param-name>
    +<param-value>C:\License.lic</param-value>
    +</init-param>
    +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.
  2. +
  3. Download the IT Hit WebDAV Ajax Library. You can do this with NPM command-line tool, which is included with Node.js. Install the Node.js and navigate to \collectionsync\WEB-INF\wwwroot\js\ folder. Run:  +
    npm install webdav.client
    +This will download IT Hit WebDAV Ajax Library files into your project. Note that Node.js itself is NOT required to run the server, it is used ONLY to install the required JavaScript files.
  4. +
  5. Configure the storage folder. By default, this sample publishes documents from the WEB-INF/Storage 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 web.xml:
    +
    <init-param>
    +<param-name>root</param-name>
    +<param-value>C:\Storage\</param-value>
    +</init-param>
    +
  6. +
  7. Configure the application server. Here we will configure WebDAV server to run on the website root (http://server.com/). Note: While you can configure WebDAV server to run on site non-root (for instance on http://server.com/webdavroot/) 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. See also Making Microsoft Office to Work with WebDAV Server and Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page. +
      +
    • In the case of Tomcat:
      Copy \collectionsync folder to <Your Tomcat location>\Tomcat x.x\webapps folder. Add the following lines under the <Host> tag in <Your Tomcat location>\Tomcat x.x\conf\server.xml:
      +
      <Context path="" debug="0" docBase="collectionsync">
      +</Context>
      +

      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 connect to the server with any WebDAV client.

      +

      If you experience any problems examine the log created by tomcat: <Your Tomcat location>\Tomcat x.x\logs\localhost.xxxx-xx-xx.log.

      +
    • +
    • In the case of Glassfish:
        +
      1. Deploy the collectionsync application. +

        From the main tree (Common Tasks) goto Applications.

        +

        Press Deploy and specify following properties:

        +

                  - Local Packaged File or Directory That Is Accessible from the Enterprise Server = <path to collectionsync directory>

        +

                  - Type = Web Application

        +

                  - Context Root = /

        +

                             Note: sample can be deployed to a non-root context, but some clients work only with servers deployed to root the context.

        +

                  - Application Name = collectionsync

        +
      2. +
      3. Launch the sample. +

        From the main tree (Common Tasks) go to Applications.

        +

        Press Launch on collectionsync application.

        +

        If everything was set up properly you should see a sample page with a list of sample files and folders. Now connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <GLASSFISH_INSTANCE_ROOT>/logs/server.log.

        +
      4. +
    • +
    • In the case of JBoss WildFly:
        +
      1. By default WildFly restricts access to certain packages from Java SDK. So you need to allow com.sun.nio.file package in the sun/jdk module by adding the following line in the module.xml file: +
        <path name="com/sun/nio/file"/>
        +

        Restart WildFly.

        +
      2. +
      3. Deploy the collectionsync application. +

        Create folder collectionsync.war under <WILDFLY_ROOT>/deployments.

        +

        Copy content of samples/collectionsync to <WILDFLY_ROOT>/deployments/collectionsync.war.

        +

        Create file collectionsync.war.dodeploy in <WILDFLY_ROOT>/deployments/collectionsync.war.

        +

        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 connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <WILDFLY_ROOT>/log/server.log.

        +
      4. +
    • +
    +
  8. +
+

The Project Classes

+

On the diagram below you can see the classes in the WebDAV Collectionsyncproject:

+

+

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 Creating a Class 1 WebDAV Server and Creating Class 2 WebDAV Server article as well as in the class reference documentation.

+

 

+

See Also:

+ +

 

+

collectionsync

+

Next Article:

+Java WebDAV Server Example for Android diff --git a/Java/jakarta/collectionsync/pom.xml b/Java/jakarta/collectionsync/pom.xml index 8af421b..bb23b87 100644 --- a/Java/jakarta/collectionsync/pom.xml +++ b/Java/jakarta/collectionsync/pom.xml @@ -214,7 +214,7 @@ update src/main/webapp/WEB-INF/wwwroot/js - C:\Users\build\AppData\Local\Temp\ + c:\temp\ diff --git a/Java/jakarta/filesystemstorage/README.md b/Java/jakarta/filesystemstorage/README.md index 46b134b..affcc74 100644 --- a/Java/jakarta/filesystemstorage/README.md +++ b/Java/jakarta/filesystemstorage/README.md @@ -1 +1,85 @@ -ÿþ \ No newline at end of file + +

WebDAV Server Example with File System Back-end, Java and Kotlin

+

This sample is a fully functional Class 2 WebDAV server that stores all data in the file system. It utilizes file system Extended Attributes (in case of Linux and macOS) or Alternate Data Streams (in case of Windows/NTFS) to store locks and custom properties. The IT Hit WebDAV Ajax Library 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.

+

Requirements

+ +

You will also need the IT Hit WebDAV Ajax Library 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 ONLY required to download the JavaScript files used in the project. Node.js is NOT required to run the server.

+

Running the sample

+
    +
  1. Set license. Download your license file here. To set the license, edit the 'license' section in \filesystemstorage\WEB-INF\web.xml and specify the path to the license.lic file.
    +
    <init-param>
    +<param-name>license</param-name>
    +<param-value>C:\License.lic</param-value>
    +</init-param>
    +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.
  2. +
  3. Download the IT Hit WebDAV Ajax Library. You can do this with NPM command-line tool, which is included with Node.js. Install the Node.js and navigate to \filesystemstorage\WEB-INF\wwwroot\js\ folder. Run:  +
    npm install webdav.client
    +This will download IT Hit WebDAV Ajax Library files into your project. Note that Node.js itself is NOT required to run the server, it is used ONLY to install the required JavaScript files.
  4. +
  5. Configure the storage folder. By default, this sample publishes documents from the WEB-INF/Storage 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 web.xml:
    +
    <init-param>
    +<param-name>root</param-name>
    +<param-value>C:\Storage\</param-value>
    +</init-param>
    +
  6. +
  7. Configure the application server. Here we will configure WebDAV server to run on the website root (http://server.com/). Note: While you can configure WebDAV server to run on site non-root (for instance on http://server.com/webdavroot/) 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. See also Making Microsoft Office to Work with WebDAV Server and Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page. +
      +
    • In the case of Tomcat:
      Copy \filesystemstorage folder to <Your Tomcat location>\Tomcat x.x\webapps folder. Add the following lines under the <Host> tag in <Your Tomcat location>\Tomcat x.x\conf\server.xml:
      +
      <Context path="" debug="0" docBase="filesystemstorage">
      +</Context>
      +

      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 connect to the server with any WebDAV client.

      +

      If you experience any problems examine the log created by tomcat: <Your Tomcat location>\Tomcat x.x\logs\localhost.xxxx-xx-xx.log.

      +
    • +
    • In the case of Glassfish:
        +
      1. Deploy the filesystem storage application. +

        From the main tree (Common Tasks) goto Applications.

        +

        Press Deploy and specify following properties:

        +

                  - Local Packaged File or Directory That Is Accessible from the Enterprise Server = <path to filesystem storage directory>

        +

                  - Type = Web Application

        +

                  - Context Root = /

        +

                             Note: sample can be deployed to a non-root context, but some clients work only with servers deployed to root the context.

        +

                  - Application Name = filesystemstorage

        +
      2. +
      3. Launch the sample. +

        From the main tree (Common Tasks) go to Applications.

        +

        Press Launch on filesystemstorage application.

        +

        If everything was set up properly you should see a sample page with a list of sample files and folders. Now connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <GLASSFISH_INSTANCE_ROOT>/logs/server.log.

        +
      4. +
    • +
    • In the case of JBoss WildFly:
        +
      1. By default WildFly restricts access to certain packages from Java SDK. So you need to allow com.sun.nio.file package in the sun/jdk module by adding the following line in the module.xml file: +
        <path name="com/sun/nio/file"/>
        +

        Restart WildFly.

        +
      2. +
      3. Deploy the filesystem storage application. +

        Create folder filesystemstorage.war under <WILDFLY_ROOT>/deployments.

        +

        Copy content of samples/filesystemstorage to <WILDFLY_ROOT>/deployments/filesystemstorage.war.

        +

        Create file filesystemstorage.war.dodeploy in <WILDFLY_ROOT>/deployments/filesystemstorage.war.

        +

        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 connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <WILDFLY_ROOT>/log/server.log.

        +
      4. +
    • +
    +
  8. +
+

The Project Classes

+

On the diagram below you can see the classes in the WebDAV File System project:

+

File system diagram

+

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 Creating a Class 1 WebDAV Server and Creating Class 2 WebDAV Server article as well as in the class reference documentation.

+

 

+

See Also:

+ +

 

+

Next Article:

+WebDAV Server Example with Collection Synchronization Support diff --git a/Java/jakarta/filesystemstorage/pom.xml b/Java/jakarta/filesystemstorage/pom.xml index ab517ca..dfc155d 100644 --- a/Java/jakarta/filesystemstorage/pom.xml +++ b/Java/jakarta/filesystemstorage/pom.xml @@ -220,7 +220,7 @@ update src/main/webapp/WEB-INF/wwwroot/js - C:\Users\build\AppData\Local\Temp\ + c:\temp\
diff --git a/Java/jakarta/springboot3fsstorage/README.md b/Java/jakarta/springboot3fsstorage/README.md index 13d6e4f..7d4b54a 100644 --- a/Java/jakarta/springboot3fsstorage/README.md +++ b/Java/jakarta/springboot3fsstorage/README.md @@ -78,4 +78,3 @@ The IT Hit Java WebDAV Server Library is fully functional and does not have any

 

Next Article:

Spring Boot WebDAV Server Example with Oracle Back-end, Java - diff --git a/Java/javax/collectionsync/README.md b/Java/javax/collectionsync/README.md index 46b134b..7dfcc81 100644 --- a/Java/javax/collectionsync/README.md +++ b/Java/javax/collectionsync/README.md @@ -1 +1,87 @@ -ÿþ \ No newline at end of file + +

WebDAV Server Example with Collection Synchronization Support

+

This sample is a fully functional Class 2 WebDAV server with collection synchronization support (RFC 6578) that stores all data in the file system. This sample is similar to what is provided by the Java demo WebDAV server at: https://webdavserver.com 

+

To access this sample server and test synchronization you can use the WebDAV Drive sample for Windows and macOS.

+

This sample can be downloaded in the product download area as well as it is published on GitHub. It is available for both jakarta and javax.

+

Requirements

+ +

You will also need the IT Hit WebDAV Ajax Library 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 ONLY required to download the JavaScript files used in the project. Node.js is NOT required to run the server.

+

Running the sample

+
    +
  1. Set license. Download your license file here. To set the license, edit the 'license' section in \collectionsync\WEB-INF\web.xml and specify the path to the license.lic file.
    +
    <init-param>
    +<param-name>license</param-name>
    +<param-value>C:\License.lic</param-value>
    +</init-param>
    +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.
  2. +
  3. Download the IT Hit WebDAV Ajax Library. You can do this with NPM command-line tool, which is included with Node.js. Install the Node.js and navigate to \collectionsync\WEB-INF\wwwroot\js\ folder. Run:  +
    npm install webdav.client
    +This will download IT Hit WebDAV Ajax Library files into your project. Note that Node.js itself is NOT required to run the server, it is used ONLY to install the required JavaScript files.
  4. +
  5. Configure the storage folder. By default, this sample publishes documents from the WEB-INF/Storage 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 web.xml:
    +
    <init-param>
    +<param-name>root</param-name>
    +<param-value>C:\Storage\</param-value>
    +</init-param>
    +
  6. +
  7. Configure the application server. Here we will configure WebDAV server to run on the website root (http://server.com/). Note: While you can configure WebDAV server to run on site non-root (for instance on http://server.com/webdavroot/) 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. See also Making Microsoft Office to Work with WebDAV Server and Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page. +
      +
    • In the case of Tomcat:
      Copy \collectionsync folder to <Your Tomcat location>\Tomcat x.x\webapps folder. Add the following lines under the <Host> tag in <Your Tomcat location>\Tomcat x.x\conf\server.xml:
      +
      <Context path="" debug="0" docBase="collectionsync">
      +</Context>
      +

      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 connect to the server with any WebDAV client.

      +

      If you experience any problems examine the log created by tomcat: <Your Tomcat location>\Tomcat x.x\logs\localhost.xxxx-xx-xx.log.

      +
    • +
    • In the case of Glassfish:
        +
      1. Deploy the collectionsync application. +

        From the main tree (Common Tasks) goto Applications.

        +

        Press Deploy and specify following properties:

        +

                  - Local Packaged File or Directory That Is Accessible from the Enterprise Server = <path to collectionsync directory>

        +

                  - Type = Web Application

        +

                  - Context Root = /

        +

                             Note: sample can be deployed to a non-root context, but some clients work only with servers deployed to root the context.

        +

                  - Application Name = collectionsync

        +
      2. +
      3. Launch the sample. +

        From the main tree (Common Tasks) go to Applications.

        +

        Press Launch on collectionsync application.

        +

        If everything was set up properly you should see a sample page with a list of sample files and folders. Now connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <GLASSFISH_INSTANCE_ROOT>/logs/server.log.

        +
      4. +
    • +
    • In the case of JBoss WildFly:
        +
      1. By default WildFly restricts access to certain packages from Java SDK. So you need to allow com.sun.nio.file package in the sun/jdk module by adding the following line in the module.xml file: +
        <path name="com/sun/nio/file"/>
        +

        Restart WildFly.

        +
      2. +
      3. Deploy the collectionsync application. +

        Create folder collectionsync.war under <WILDFLY_ROOT>/deployments.

        +

        Copy content of samples/collectionsync to <WILDFLY_ROOT>/deployments/collectionsync.war.

        +

        Create file collectionsync.war.dodeploy in <WILDFLY_ROOT>/deployments/collectionsync.war.

        +

        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 connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <WILDFLY_ROOT>/log/server.log.

        +
      4. +
    • +
    +
  8. +
+

The Project Classes

+

On the diagram below you can see the classes in the WebDAV Collectionsyncproject:

+

+

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 Creating a Class 1 WebDAV Server and Creating Class 2 WebDAV Server article as well as in the class reference documentation.

+

 

+

See Also:

+ +

 

+

collectionsync

+

Next Article:

+Java WebDAV Server Example for Android diff --git a/Java/javax/collectionsync/pom.xml b/Java/javax/collectionsync/pom.xml index ad8d70f..a4e1418 100644 --- a/Java/javax/collectionsync/pom.xml +++ b/Java/javax/collectionsync/pom.xml @@ -225,7 +225,7 @@ update src/main/webapp/WEB-INF/wwwroot/js - C:\Users\build\AppData\Local\Temp\ + c:\temp\
diff --git a/Java/javax/deltav/README.md b/Java/javax/deltav/README.md index 46b134b..0d946ba 100644 --- a/Java/javax/deltav/README.md +++ b/Java/javax/deltav/README.md @@ -1 +1,106 @@ -ÿþ \ No newline at end of file + +

WebDAV Server Example with Versioning, Java

+

The sample provides DeltaV WebDAV server implementation that can be hosted in Apache Tomcat, GlassFish, JBoss, WebLogic or WebSphere. The data is stored in Oracle database. The IT Hit WebDAV Ajax Library 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 server.

+

Requirements

+ +

You will also need the IT Hit WebDAV Ajax Library 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 ONLY required to download the JavaScript files used in the project. Node.js is NOT required to run the server.

+

Running the sample

+
    +
  1. Create the database. The Oracle database script is located in \samples\deltav\db\deltav.sql file. This script creates tables and populates them with data so your WebDAV server initially has several folders and files. To run the script login to Oracle administration web interface, go to SQL->SQL Scripts->Create, then paste content of deltav.sql to script field, specify a script name and click Run.
    +

    It is also recommended to increase the datafile. After creating the database run the following command:

    +
    +
    alter database datafile ' C:\oraclexe\oradata\XE\SYSTEM.DBF' resize 4g;
    +
    +

     This is especially required if you would like to test WebDAV server running Oracle XE with IT Hit AJAX File Browser.

    +
  2. +
  3. Set license. Download your license file here. To set the license edit license section in \deltav\WEB-INF\web.xml and specify the path to the license.lic file. +
    <init-param>
    +<param-name>license</param-name>
    +<param-value>C:\License.lic</param-value>
    +</init-param>
    +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.
  4. +
  5. Download the IT Hit WebDAV Ajax Library. You can do this with NPM command line tool, which is included with Node.js. Install the Node.js and navigate to \deltav\WEB-INF\wwwroot\js\ folder. Run:  +
    npm install webdav.client
    +This will download IT Hit WebDAV Ajax Library files into your project. Note that Node.js itself is NOT required to run the server, it is used ONLY to install the required JavaScript files.
  6. +
  7. Configure the application server. Here we will configure WebDAV server to run on the website root (http://server.com/).While you can configure WebDAV server to run on site non-root (for instance on http://server.com/webdavroot/) 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 does not get the response they will not be able to connect. See also Making Microsoft Office to Work with WebDAV Server and Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page.
      +
    1. In the case of Tomcat:
      Copy \deltav folder to <Your Tomcat location>\Tomcat x.x\webapps folder. Add the following lines under the <Host> tag in <Your Tomcat location>\Tomcat x.x\conf\server.xml:
      +
      <Context path="" debug="0" docBase="deltav">
      + <Resource name="jdbc/Oracle" auth="Container"
      +        type="javax.sql.DataSource" username="system" password="pwd"
      +        driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:XE"
      +        maxActive="8" maxIdle="4" factory="org.apache.commons.dbcp.BasicDataSourceFactory"/>
      +</Context>
      +

      Specify Oracle database login credentials in Context tag. Check you service instance Id in server url. 
      Finally, restart the Tomcat for configuration changes to take effect.

      +

      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 connect to the server with any WebDAV client.

      +

      If you experience any problems examine the log created by tomcat: <Your Tomcat location>\Tomcat x.x\logs\localhost.xxxx-xx-xx.log.

      +
    2. +
    3. In the case of Glassfish:
        +
      1. Create oracle connection pool. +

        Copy \deltav\WEB-INF\lib\ojdbc6.jar to  <GLASSFISH_HOME>/domains/domain1/lib/ext folder. Note that "domain1" is a default Glassfish domain. The  domain may be different for specific deployments.

        +

        Restart GlassFish.

        +

        Open administrative console of the Glassfish server.

        +

        From the main tree (Common Tasks) expand Resources and go to JDBC > Connection Pools. Create a Connection pool:

        +

                  - JNDI name = Oracle

        +

                  - resource_type = javax.sql.ConnectionPoolDataSource

        +

                  - Database Vendor = Oracle                                                  

        +

        Click Next.

        +

        Specify following additional properties (replace following values with your specific):

        +

                  - url = jdbc:oracle:thin:@localhost:1521:XE

        +

                  - user = system

        +

                  - password = password

        +

                  - xa-driver-does-not-support-non-tx-operations = true

        +

        Test connection with Ping button.

        +
      2. +
      3. Create DataSource. +

        From the main tree (Common Tasks) expand Resources and go to JDBC > JDBC Resources.

        +

        Press New and provide the following information:

        +

                  - JNDI Name: JDBC/Oracle (must be called exactly like this).

        +

                  - Pool Name: The pool name created in the previous section.

        +

        Press OK, JDBC-resource will be created.

        +
      4. +
      5. Deploy deltav storage application. +

        From the main tree (Common Tasks) goto Applications.

        +

        Press Deploy and specify following properties:

        +

                  - Local Packaged File or Directory That Is Accessible from the Enterprise Server = <path to deltav storage directory>

        +

                  - Type = Web Application

        +

                  - Context Root = /

        +

                             Note: sample can be deployed to a non-root context, but some clients work only with servers deployed to root the context.

        +

                  - Application Name = deltav

        +
      6. +
      7. Launch sample. +

        From the main tree (Common Tasks) go to Applications.

        +

        Press Launch on oracle storage application.

        +

        If everything was set up properly you should see a sample page with a list of sample files and folders. Now connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <GLASSFISH_INSTANCE_ROOT>/logs/server.log.

        +
      8. +
    4. +
  8. +
+

Using with Microsoft Office and other Applications.

+

By default, the WebDAV Versioning Example is using CheckOutUnlockedCheckIn auto versioning mode. You can see how this mode works on the diagram in the Creating DeltaV WebDAV Server article. The idea of this mode is to minimize an amount of versions automatically created when the file is being saved. This works especially well with applications that lock WebDAV files such as Microsoft Office.

+

In this mode, the new version is created when the file is being unlocked by Microsoft Office, usually when the user closes the document. Between Lock and Unlock no new versions are created, Lock/Unlock acts as a Check-out/Check-in operations. For applications that do not lock files, the new version is created each time the file is being saved.

+

Ajax Browser Versions list

+

The Example Project Classes

+

On the diagram below you can see the classes in WebDAV DeltaV project.

+

DeltaV diagram

+

You can find more about building a server with versioning in Creating WebDAV Server with Versioning Support article. You may also want to read Creating a Class 1 WebDAV Server and Creating Class 2 WebDAV Server articles.

+

How Things Get Stored ? Overview of the Oracle Back-end

+

The database consists of 5 entities as depicted in the figure below. 2 of them, Property and Lock, are identical to the tables found in SqlStorage example - Properties and Lock. The Repository table contains additional fields: CREATORDISPLAYNAMECHANGENOTESCHECKEDOUTAUTOVERSIONVERSIONCONTROLLED, CHECKEDINDURINGUNLCOKand CHECKEDINONFILECOMPLETE.

+

DeltaV DB diagram

+

Version table

+

The Version table contains file versions. If versioning is enabled each file contains at least one version in this table.

+

VersionProperty table

+

The VersionProperty table contains a snapshot of the properties that was attached to the item when this version was created.

+

 

+

See Also:

+ +

 

+

Next Article:

+Running the WebDAV Samples diff --git a/Java/javax/deltav/pom.xml b/Java/javax/deltav/pom.xml index 3c21c2d..276cb2d 100644 --- a/Java/javax/deltav/pom.xml +++ b/Java/javax/deltav/pom.xml @@ -276,7 +276,7 @@ update src/main/webapp/WEB-INF/wwwroot/js - C:\Users\build\AppData\Local\Temp\ + c:\temp\
diff --git a/Java/javax/filesystemstorage/README.md b/Java/javax/filesystemstorage/README.md index 46b134b..affcc74 100644 --- a/Java/javax/filesystemstorage/README.md +++ b/Java/javax/filesystemstorage/README.md @@ -1 +1,85 @@ -ÿþ \ No newline at end of file + +

WebDAV Server Example with File System Back-end, Java and Kotlin

+

This sample is a fully functional Class 2 WebDAV server that stores all data in the file system. It utilizes file system Extended Attributes (in case of Linux and macOS) or Alternate Data Streams (in case of Windows/NTFS) to store locks and custom properties. The IT Hit WebDAV Ajax Library 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.

+

Requirements

+ +

You will also need the IT Hit WebDAV Ajax Library 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 ONLY required to download the JavaScript files used in the project. Node.js is NOT required to run the server.

+

Running the sample

+
    +
  1. Set license. Download your license file here. To set the license, edit the 'license' section in \filesystemstorage\WEB-INF\web.xml and specify the path to the license.lic file.
    +
    <init-param>
    +<param-name>license</param-name>
    +<param-value>C:\License.lic</param-value>
    +</init-param>
    +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.
  2. +
  3. Download the IT Hit WebDAV Ajax Library. You can do this with NPM command-line tool, which is included with Node.js. Install the Node.js and navigate to \filesystemstorage\WEB-INF\wwwroot\js\ folder. Run:  +
    npm install webdav.client
    +This will download IT Hit WebDAV Ajax Library files into your project. Note that Node.js itself is NOT required to run the server, it is used ONLY to install the required JavaScript files.
  4. +
  5. Configure the storage folder. By default, this sample publishes documents from the WEB-INF/Storage 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 web.xml:
    +
    <init-param>
    +<param-name>root</param-name>
    +<param-value>C:\Storage\</param-value>
    +</init-param>
    +
  6. +
  7. Configure the application server. Here we will configure WebDAV server to run on the website root (http://server.com/). Note: While you can configure WebDAV server to run on site non-root (for instance on http://server.com/webdavroot/) 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. See also Making Microsoft Office to Work with WebDAV Server and Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page. +
      +
    • In the case of Tomcat:
      Copy \filesystemstorage folder to <Your Tomcat location>\Tomcat x.x\webapps folder. Add the following lines under the <Host> tag in <Your Tomcat location>\Tomcat x.x\conf\server.xml:
      +
      <Context path="" debug="0" docBase="filesystemstorage">
      +</Context>
      +

      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 connect to the server with any WebDAV client.

      +

      If you experience any problems examine the log created by tomcat: <Your Tomcat location>\Tomcat x.x\logs\localhost.xxxx-xx-xx.log.

      +
    • +
    • In the case of Glassfish:
        +
      1. Deploy the filesystem storage application. +

        From the main tree (Common Tasks) goto Applications.

        +

        Press Deploy and specify following properties:

        +

                  - Local Packaged File or Directory That Is Accessible from the Enterprise Server = <path to filesystem storage directory>

        +

                  - Type = Web Application

        +

                  - Context Root = /

        +

                             Note: sample can be deployed to a non-root context, but some clients work only with servers deployed to root the context.

        +

                  - Application Name = filesystemstorage

        +
      2. +
      3. Launch the sample. +

        From the main tree (Common Tasks) go to Applications.

        +

        Press Launch on filesystemstorage application.

        +

        If everything was set up properly you should see a sample page with a list of sample files and folders. Now connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <GLASSFISH_INSTANCE_ROOT>/logs/server.log.

        +
      4. +
    • +
    • In the case of JBoss WildFly:
        +
      1. By default WildFly restricts access to certain packages from Java SDK. So you need to allow com.sun.nio.file package in the sun/jdk module by adding the following line in the module.xml file: +
        <path name="com/sun/nio/file"/>
        +

        Restart WildFly.

        +
      2. +
      3. Deploy the filesystem storage application. +

        Create folder filesystemstorage.war under <WILDFLY_ROOT>/deployments.

        +

        Copy content of samples/filesystemstorage to <WILDFLY_ROOT>/deployments/filesystemstorage.war.

        +

        Create file filesystemstorage.war.dodeploy in <WILDFLY_ROOT>/deployments/filesystemstorage.war.

        +

        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 connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <WILDFLY_ROOT>/log/server.log.

        +
      4. +
    • +
    +
  8. +
+

The Project Classes

+

On the diagram below you can see the classes in the WebDAV File System project:

+

File system diagram

+

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 Creating a Class 1 WebDAV Server and Creating Class 2 WebDAV Server article as well as in the class reference documentation.

+

 

+

See Also:

+ +

 

+

Next Article:

+WebDAV Server Example with Collection Synchronization Support diff --git a/Java/javax/filesystemstorage/pom.xml b/Java/javax/filesystemstorage/pom.xml index 05b2377..1b1230b 100644 --- a/Java/javax/filesystemstorage/pom.xml +++ b/Java/javax/filesystemstorage/pom.xml @@ -204,7 +204,7 @@ update src/main/webapp/WEB-INF/wwwroot/js - C:\Users\build\AppData\Local\Temp\ + c:\temp\
diff --git a/Java/javax/oraclestorage/README.md b/Java/javax/oraclestorage/README.md index 46b134b..41a3c43 100644 --- a/Java/javax/oraclestorage/README.md +++ b/Java/javax/oraclestorage/README.md @@ -1 +1,103 @@ -ÿþ \ No newline at end of file + +

WebDAV Server Example with Oracle Back-end, Java

+

The sample provides Class 2 WebDAV server implementation that can be hosted in Apache Tomcat, GlassFish, JBoss, WebLogic, WebSphere or other compliant application server. All data including file content, documents structure and custom attributes is stored in Oracle database. The IT Hit WebDAV Ajax Library 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 server.

+

Requirements

+ +

You will also need the IT Hit WebDAV Ajax Library 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 ONLY required to download the JavaScript files used in the project. Node.js is NOT required to run the server.

+

Running the sample

+
    +
  1. Create the database. The Oracle database script is located in \samples\oraclestorage\db\OracleStorage.sql file. This script creates tables and populates them with data so your WebDAV server initially has several folders and files. To run the script login to Oracle administration web interface, go to SQL->SQL Scripts->Create, then paste content of OracleStorage.sql to script field, specify a script name and click Run.
    +

    It is also recommended to increase the datafile. After creating the database run the following command:

    +
    +
    alter database datafile ' C:\oraclexe\oradata\XE\SYSTEM.DBF' resize 4g;
    +
    +

     This is especially required if you would like to test WebDAV server running Oracle XE with IT Hit AJAX File Browser.

    +
  2. +
  3. Set license. Download your license file here. To set the license edit license section in \oraclestorage\WEB-INF\web.xml and specify the path to the license.lic file. +
    <init-param>
    +<param-name>license</param-name>
    +<param-value>C:\License.lic</param-value>
    +</init-param>
    +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.
  4. +
  5. Download the IT Hit WebDAV Ajax Library. You can do this with NPM command line tool, which is included with Node.js. Install the Node.js and navigate to \oraclestorage\WEB-INF\wwwroot\js\ folder. Run:  +
    npm install webdav.client
    +This will download IT Hit WebDAV Ajax Library files into your project. Note that Node.js itself is NOT required to run the server, it is used ONLY to install the required JavaScript files.
  6. +
  7. Configure the application server. Here we will configure WebDAV server to run on the website root (http://server.com/). Note: While you can configure WebDAV server to run on site non-root (for instance on http://server.com/webdavroot/) 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 does not get the response they will not be able to connect. See also Making Microsoft Office to Work with WebDAV Server and Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page.
      +
    1. In the case of Tomcat:
      Copy \oraclestorage folder to <Your Tomcat location>\Tomcat x.x\webapps folder. Add the following lines under the <Host> tag in <Your Tomcat location>\Tomcat x.x\conf\server.xml:
      +
      <Context path="" debug="0" docBase="oraclestorage">
      + <Resource name="jdbc/Oracle" auth="Container"
      +        type="javax.sql.DataSource" username="system" password="pwd"
      +        driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:XE"
      +        maxActive="8" maxIdle="4" factory="org.apache.commons.dbcp.BasicDataSourceFactory"/>
      +</Context>
      +

      Specify Oracle database login credentials in Context tag. Check you service instance Id in server url. 
      Finally, restart the Tomcat for configuration changes to take effect.

      +

      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 connect to the server with any WebDAV client.

      +

      If you experience any problems examine the log created by tomcat: <Your Tomcat location>\Tomcat x.x\logs\localhost.xxxx-xx-xx.log.

      +
    2. +
    3. In the case of Glassfish:
        +
      1. Create oracle connection pool. +

        Copy \oraclestorage\WEB-INF\lib\oracle-driver-ojdbc6-x.x.x.x.jar to  <GLASSFISH_HOME>/domains/domain1/lib/ext folder. Note that "domain1" is a default Glassfish domain. The  domain may be different for specific deployments.

        +

        Restart GlassFish.

        +

        Open administrative console of the Glassfish server.

        +

        From the main tree (Common Tasks) expand Resources and go to JDBC > Connection Pools. Create a Connection pool:

        +

                  - JNDI name = Oracle

        +

                  - resource_type = javax.sql.ConnectionPoolDataSource

        +

                  - Database Vendor = Oracle                                                  

        +

        Click Next.

        +

        Specify following additional properties (replace following values with your specific):

        +

                  - url = jdbc:oracle:thin:@localhost:1521:XE

        +

                  - user = system

        +

                  - password = password

        +

                  - xa-driver-does-not-support-non-tx-operations = true

        +

        Test connection with Ping button.

        +
      2. +
      3. Create DataSource. +

        From the main tree (Common Tasks) expand Resources and go to JDBC > JDBC Resources.

        +

        Press New and provide the following information:

        +

                  - JNDI Name: JDBC/Oracle (must be called exactly like this).

        +

                  - Pool Name: The pool name created in the previous section.

        +

        Press OK, JDBC-resource will be created.

        +
      4. +
      5. Deploy oracle storage application. +

        From the main tree (Common Tasks) goto Applications.

        +

        Press Deploy and specify following properties:

        +

                  - Local Packaged File or Directory That Is Accessible from the Enterprise Server = <path to oracle storage directory>

        +

                  - Type = Web Application

        +

                  - Context Root = /

        +

                             Note: sample can be deployed to a non-root context, but some clients work only with servers deployed to root the context.

        +

                  - Application Name = oraclestorage

        +
      6. +
      7. Launch sample. +

        From the main tree (Common Tasks) go to Applications.

        +

        Press Launch on oraclestorage application.

        +

        If everything was set up properly you should see a sample page with a list of sample files and folders. Now connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <GLASSFISH_INSTANCE_ROOT>/logs/server.log.

        +
      8. +
    4. +
  8. +
+

The Project Classes

+

On the diagram below you can see the classes in WebDAV OracleStorage project.

+

Oracle class diagram

+

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 Creating a Class 1 WebDAV Server and Creating Class 2 WebDAV Server article as well as in the class reference documentation.

+

How Things Get Stored ? Overview of the Oracle Back-end

+

The database consists of 3 entities as depicted in the figure below.

+

Oracle DB diagram

+

Repository Table

+

All the information about files and folders along with their content is stored here. Following is the list of columns with a brief description of each field.

+

Lock Table

+

The Lock table stores lock applied to items. You can find more about locking in the Creating Class 2 WebDAV Server article.

+

Properties Table

+

All the information about the properties pertaining to each item is stored in Properties table.

+

 

+

See Also:

+ +

Next Article:

+WebDAV Server Example with File System Back-end, Java and Kotlin diff --git a/Java/javax/oraclestorage/pom.xml b/Java/javax/oraclestorage/pom.xml index 22778c6..1c6b208 100644 --- a/Java/javax/oraclestorage/pom.xml +++ b/Java/javax/oraclestorage/pom.xml @@ -276,7 +276,7 @@ update src/main/webapp/WEB-INF/wwwroot/js - C:\Users\build\AppData\Local\Temp\ + c:\temp\
diff --git a/Java/javax/springbootfsstorage/README.md b/Java/javax/springbootfsstorage/README.md index 13d6e4f..7d4b54a 100644 --- a/Java/javax/springbootfsstorage/README.md +++ b/Java/javax/springbootfsstorage/README.md @@ -78,4 +78,3 @@ The IT Hit Java WebDAV Server Library is fully functional and does not have any

 

Next Article:

Spring Boot WebDAV Server Example with Oracle Back-end, Java - diff --git a/Java/javax/springbootoraclestorage/README.md b/Java/javax/springbootoraclestorage/README.md index 46b134b..2513d4f 100644 --- a/Java/javax/springbootoraclestorage/README.md +++ b/Java/javax/springbootoraclestorage/README.md @@ -1 +1,44 @@ -ÿþ \ No newline at end of file + +

Spring Boot WebDAV Server Example with Oracle Back-end, Java

+

This sample provides a WebDAV server running on the Spring Boot framework. All data including file content, document structure, and custom attributes are stored in the Oracle database. The IT Hit WebDAV Ajax Library 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 them back directly to the server.

+

This sample can be downloaded in the product download area as well as it is published on GitHub.

+

Requirements

+ +

Running the sample

+
    +
  1. Set the license. Download your license file here. To set the license, edit the webdav.license section in \springboot\src\main\resources\application.properties and specify the path to the license.lic file. 
    +
    webdav.license=C:\License.lic
    +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.
  2. +
  3. Configure the application server. Here we will configure the WebDAV server to run on the website non-root context (https://server/DAV/). This setting is located in the webdav.rootContext section in the \springboot\src\main\resources\application.properties.
    +
    webdav.rootContext=/
    +Note: 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 a 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. For this reason, this sample processes OPTIONS and PROPFIND requests on all folders, including on the site root (https://server/). See also Making Microsoft Office to Work with WebDAV Server and Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page.
    This Spring Boot sample supports those configuration requests and works properly on a non-root context.
  4. +
  5. Set Oracle BD connection string. Provide you connection string and credentials in the \springboot\src\main\resources\application.properties.
    +
    spring.datasource.url=jdbc:oracle:thin:@localhost:1521:xe
    +spring.datasource.username=system
    +spring.datasource.password=pwd
    +Database structure for your WebDAV server will be created during application startup from the file springboot\src\main\resources\db\OracleStorage.sql
  6. +
  7. Running the springboot sample. To start the sample, change the directory to springboot and execute the following command: +
    mvnw spring-boot:run
    +

    If everything was set up properly you should see a sample web page on  https://server/DAV/ URL. Now you can upload documents, open documents for editing, manage documents, as well as connect to the server with any WebDAV client.

    +

    If anything goes wrong examine the log file. For Spring Boot, the log file is usually located at springboot/log/engine.log. You may also need to capture and examine the HTTP requests. See this article for more details. 

    +
  8. +
+

The Project Classes

+

On the diagram below you can see the classes in the WebDAV SpringBoot SQL sample:

+

Class diagram of the sample Java WebDAV Server running on Spring Boot for Oracle

+

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 Creating a Class 1 WebDAV Server and Creating Class 2 WebDAV Server article as well as in the class reference documentation.

+

 

+

See Also:

+ +

 

+

Next Article:

+Spring Boot WebDAV Server Example with Amazon S3 Back-end, Java diff --git a/Java/javax/springboots3storage/README.md b/Java/javax/springboots3storage/README.md index 46b134b..37cfab1 100644 --- a/Java/javax/springboots3storage/README.md +++ b/Java/javax/springboots3storage/README.md @@ -1 +1,60 @@ -ÿþ \ No newline at end of file + +

Spring Boot WebDAV Server Example with Amazon S3 Back-end, Java

+

This sample is a fully functional Class 2 WebDAV server that runs on the Spring Boot framework and stores all data in the Amazon S3 bucket. The WebDAV requests are processed on a /DAV/ context, while the rest of the website processes regular HTTP requests, serving web pages. Documents are being published from the Amazon S3 bucket with locks and custom attributed being stored in S3 Metadata. 

+

This sample can be downloaded in the product download area as well as it is published on GitHub.

+

This sample is using IT Hit WebDAV Ajax Library 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.

+

 

+

Requirements

+ +

Running the sample

+
    +
  1. +

    Set the license. Download your license file here. To set the license, edit the webdav.license section in \springboot\src\main\resources\application.properties and specify the path to the license.lic file.

    +
    webdav.license=C:\License.lic
    +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.
  2. +
  3. +

    Configure the Amazon S3 storage. You can either use an existing Amazon S3 bucket or create a new one. To create a bucket you can use the Amazon S3 web console

    +

    +

    After creating the S3 bucket you can create some folders and upload files for testing purposes.

    +
  4. +
  5. +

    Configure the Amazon S3 project settings. In application.properties set the following properties:

    +
    # Amazon S3 region
    +webdav.s3.region=
    +# Amazon S3 access key
    +webdav.s3.access-key=
    +# Amazon S3 secret access key
    +webdav.s3.secret-access-key=
    +# Amazon S3 bucket name
    +webdav.s3.bucket=
    +
    +
  6. +
  7. +

    Configure the application server. Here we will configure the WebDAV server to run on the website non-root context (https://server/DAV/). This setting is located in the webdav.rootContext section in the \springboot\src\main\resources\application.properties.

    +
    webdav.rootContext=/DAV/
    +Note: 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 a 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. For this reason, this sample processes OPTIONS and PROPFIND requests on all folders, including on the site root (https://server/). See also Making Microsoft Office to Work with WebDAV Server and Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page.
    This Spring Boot sample supports those configuration requests and works properly on a non-root context.
  8. +
  9. +

    Running the springboot sample. To start the sample, change the directory to springboot and execute the following command:

    +
    mvnw spring-boot:run
    +

    If everything was set up properly you should see a sample web page on  https://server/DAV/ URL with a list of sample files and folders previously created in S3. Now you can open documents for editing, manage documents, as well as connect to the server with any WebDAV client.

    +

    If anything goes wrong examine the log file. For Spring Boot, the log file is usually located at springboot/log/engine.log. You may also need to capture and examine the HTTP requests. See this article for more details. 

    +
  10. +
+

The Project Classes

+

On the diagram below you can see the classes in the WebDAV SpringBoot S3 sample:

+

Class diagram of the sample Java WebDAV Server running on Spring Boot

+

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 Creating a Class 1 WebDAV Server and Creating Class 2 WebDAV Server article as well as in the class reference documentation.

+

 

+

See Also:

+ +

 

+

Next Article:

+WebDAV Server Example with Oracle Back-end, Java diff --git a/Kotlin/javax/filesystemstorage/README.md b/Kotlin/javax/filesystemstorage/README.md index 46b134b..affcc74 100644 --- a/Kotlin/javax/filesystemstorage/README.md +++ b/Kotlin/javax/filesystemstorage/README.md @@ -1 +1,85 @@ -ÿþ \ No newline at end of file + +

WebDAV Server Example with File System Back-end, Java and Kotlin

+

This sample is a fully functional Class 2 WebDAV server that stores all data in the file system. It utilizes file system Extended Attributes (in case of Linux and macOS) or Alternate Data Streams (in case of Windows/NTFS) to store locks and custom properties. The IT Hit WebDAV Ajax Library 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.

+

Requirements

+ +

You will also need the IT Hit WebDAV Ajax Library 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 ONLY required to download the JavaScript files used in the project. Node.js is NOT required to run the server.

+

Running the sample

+
    +
  1. Set license. Download your license file here. To set the license, edit the 'license' section in \filesystemstorage\WEB-INF\web.xml and specify the path to the license.lic file.
    +
    <init-param>
    +<param-name>license</param-name>
    +<param-value>C:\License.lic</param-value>
    +</init-param>
    +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.
  2. +
  3. Download the IT Hit WebDAV Ajax Library. You can do this with NPM command-line tool, which is included with Node.js. Install the Node.js and navigate to \filesystemstorage\WEB-INF\wwwroot\js\ folder. Run:  +
    npm install webdav.client
    +This will download IT Hit WebDAV Ajax Library files into your project. Note that Node.js itself is NOT required to run the server, it is used ONLY to install the required JavaScript files.
  4. +
  5. Configure the storage folder. By default, this sample publishes documents from the WEB-INF/Storage 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 web.xml:
    +
    <init-param>
    +<param-name>root</param-name>
    +<param-value>C:\Storage\</param-value>
    +</init-param>
    +
  6. +
  7. Configure the application server. Here we will configure WebDAV server to run on the website root (http://server.com/). Note: While you can configure WebDAV server to run on site non-root (for instance on http://server.com/webdavroot/) 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. See also Making Microsoft Office to Work with WebDAV Server and Opening Microsoft Office Documents and Other Types of Files for Editing From a Web Page. +
      +
    • In the case of Tomcat:
      Copy \filesystemstorage folder to <Your Tomcat location>\Tomcat x.x\webapps folder. Add the following lines under the <Host> tag in <Your Tomcat location>\Tomcat x.x\conf\server.xml:
      +
      <Context path="" debug="0" docBase="filesystemstorage">
      +</Context>
      +

      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 connect to the server with any WebDAV client.

      +

      If you experience any problems examine the log created by tomcat: <Your Tomcat location>\Tomcat x.x\logs\localhost.xxxx-xx-xx.log.

      +
    • +
    • In the case of Glassfish:
        +
      1. Deploy the filesystem storage application. +

        From the main tree (Common Tasks) goto Applications.

        +

        Press Deploy and specify following properties:

        +

                  - Local Packaged File or Directory That Is Accessible from the Enterprise Server = <path to filesystem storage directory>

        +

                  - Type = Web Application

        +

                  - Context Root = /

        +

                             Note: sample can be deployed to a non-root context, but some clients work only with servers deployed to root the context.

        +

                  - Application Name = filesystemstorage

        +
      2. +
      3. Launch the sample. +

        From the main tree (Common Tasks) go to Applications.

        +

        Press Launch on filesystemstorage application.

        +

        If everything was set up properly you should see a sample page with a list of sample files and folders. Now connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <GLASSFISH_INSTANCE_ROOT>/logs/server.log.

        +
      4. +
    • +
    • In the case of JBoss WildFly:
        +
      1. By default WildFly restricts access to certain packages from Java SDK. So you need to allow com.sun.nio.file package in the sun/jdk module by adding the following line in the module.xml file: +
        <path name="com/sun/nio/file"/>
        +

        Restart WildFly.

        +
      2. +
      3. Deploy the filesystem storage application. +

        Create folder filesystemstorage.war under <WILDFLY_ROOT>/deployments.

        +

        Copy content of samples/filesystemstorage to <WILDFLY_ROOT>/deployments/filesystemstorage.war.

        +

        Create file filesystemstorage.war.dodeploy in <WILDFLY_ROOT>/deployments/filesystemstorage.war.

        +

        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 connect to the server with any WebDAV client.

        +

        If anything goes wrong please consult log usually located at <WILDFLY_ROOT>/log/server.log.

        +
      4. +
    • +
    +
  8. +
+

The Project Classes

+

On the diagram below you can see the classes in the WebDAV File System project:

+

File system diagram

+

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 Creating a Class 1 WebDAV Server and Creating Class 2 WebDAV Server article as well as in the class reference documentation.

+

 

+

See Also:

+ +

 

+

Next Article:

+WebDAV Server Example with Collection Synchronization Support diff --git a/Kotlin/javax/filesystemstorage/pom.xml b/Kotlin/javax/filesystemstorage/pom.xml index 0f55f10..338e996 100644 --- a/Kotlin/javax/filesystemstorage/pom.xml +++ b/Kotlin/javax/filesystemstorage/pom.xml @@ -148,7 +148,7 @@ - C:\Java\Release\WebdavJavaRepo\DeltaV\samples\kotlinfs/src/main/kotlin + D:\myproj\Java\ithit\webdav-server-for-java\DeltaV\samples\kotlinfs/src/main/kotlin org.apache.maven.plugins @@ -237,7 +237,7 @@ update src/main/webapp/WEB-INF/wwwroot/js - C:\Users\build\AppData\Local\Temp\ + c:\temp\
diff --git a/README.md b/README.md index 46b134b..31d1c5e 100644 --- a/README.md +++ b/README.md @@ -1 +1,147 @@ -ÿþ \ No newline at end of file + +

WebDAV Server Examples, Java

+

IT Hit WebDAV Server Library for Java is provided with several examples that demonstrate how to build a WebDAV server with SQL back-end or with file system storage. You can adapt these samples to utilize almost any back-end storage including storing data in CMS/DMS/CRM, Azure or Amazon storage.

+

A sample HTML page included with samples demonstrates how to use IT Hit WebDAV Ajax Libray to open documents from a web page for editing, list documents and navigate folder structure as well as build search capabilities.

+

Online Demo Server

+

https://www.WebDAVServer.com

+

 Requirements

+

The samples are tested with Java 1.8 in the following environments:

+
    +
  • Tomcat 7 or later
  • +
  • Glassfish 4.1.1 or later
  • +
  • JBoss Wildfly 9 or later or respective EAP
  • +
  • WebLogic 12c or later
  • +
  • WebSphere 8.5.5.11 or later
  • +
  • Jetty 9.3.13 or later
  • +
+

Full-text Search and indexing

+

The samples are provided with full-text search and indexing based on use Apache Lucene as indexing engine and Apache Tika as content analysis toolkit.

+

The server implementation searches both file names and file content including content of Microsoft Office documents as well as any other documents which format is supported by Apache Tika, such as LibreOffice, OpenOffice, PDF, etc.

+