| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
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.
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.
<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.
npm install webdav.clientThis 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.
<init-param> <param-name>root</param-name> <param-value>C:\Storage\</param-value> </init-param>
<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.
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
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.
<path name="com/sun/nio/file"/>
Restart WildFly.
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.
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.
collectionsync
Java WebDAV Server Example for Android| Back | FazBrowse Home | New Git URL |