Standard WebDAV server - AstartesGuardian/WebDAV-Server GitHub Wiki
It represents a normal way to access data. It can allow a user to share (unsecured) a folder of the computer.
It accesses directly to resources on the root directory specified in the HTTPServerSettings instance.
If the server receive GET /public/chocolate.exe HTTP/1.1 and the <resource_root> used is D:\Documents\WebDAVServer, the resource will be D:\Documents\WebDAVServer\public\chocolate.exe.
-
webdav.server.standard.
StandardResource -
webdav.server.standard.
StandardResourceManager
First, you will have to import the class :
import webdav.server.standard.StandardResourceManager;Then, you will have to create the HTTPServerSettings instance for the HTTPServer with StandardResourceManager.class :
HTTPServerSettings settings = new HTTPServerSettings(
/* [...] */ StandardResourceManager.class /* [...] */
);HTTPServerSettings settings = new HTTPServerSettings(
"WebDAV Server",
HTTPCommand.getStandardCommands(),
StandardResourceManager.class,
"<my folder>"
);
HTTPServer s = new HTTPServer(1700, settings);
s.run(); // Run the server