Upgrading to WebDAV Server Library for Java v3

IT Hit WebDAV Server Library for Java v3 makes WebDAV the Engine independent of the hosting environment and allows running your WebDAV server in almost any server. The new Engine runs both on Java application server and in a mobile environment on Android.

The new version provides DavRequest and DavResponse interfaces that totally isolate the Engine from application server. It also provides default implementation of theses interfaces in HttpServletDavRequest and HttpServletDavResponse classes.

Upgrade to v3 requires minimum changes in your existing code. You will need add dependency to a new com.ithit.webdav.integration.servlet-integration and update your Engine.service() call. Follow the steps below to upgrade to v3:

  1. Add dependency on com.ithit.webdav.integration.servlet-integration jar provided with v3. You can find this module in the Maven Central Repository or you can download it in the product download area.
  2. Replace Engine.service() call with the following code:
    DavRequest davRequest = new HttpServletDavRequest(httpServletRequest);
    DavResponse davResponse = new HttpServletDavResponse(httpServletResponse);
    engine.service(davRequest, davResponse);

Upgrading to v3.1

The IT Hit WebDAV Server Library v3.1 contains changes in lock-tokens access methods. The getClientLockTokens() method is moved from the Engine class to the DavRequest class. The Engine.getClientLockTokens(DavRequest) method still exists in the Engine class for backward compatibility, but marked as deprecated.

Next Article:

Upgrading to WebDAV Server Library for Java v2