DayPilot Pro for Java requires that the backend endpoint URL is specified using backendUrl property.

Note: Standalone usage (without backendUrl) requires a DayPilot Pro for JavaScript license (see below).

Plain JavaScript

<div id="dp"></div>

<script>
  var dp = new DayPilot.Scheduler("dp");
  dp.backendUrl = '${pageContext.request.contextPath}/dps';
  // ...
  dp.init();
</script>

jQuery Plugin

<div id="dp"></div>

<script>
  var dp = $("#dp").daypilotScheduler({
    backendUrl : '${pageContext.request.contextPath}/dps',
    // ...
  });
</script>

Backend Controller

The target URL needs to point to a servlet that handles the request using a custom instance of DayPilotScheduler, DayPilotCalendar, DayPilotMonth, or DayPilotGantt class:

package org.daypilot.demo;

// ...

public class DpsServlet extends HttpServlet {

  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  }

  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    new Dps().process(request, response);
  }

  public class Dps extends DayPilotScheduler {

    @Override
    public void onInit() throws Exception {
       // ...
    }

  }
}

Licensing Restrictions

Please note that using the JavaScript files (e.g. daypilot-all.min.js) from DayPilot Pro for Java in a standalone mode (without the integrated backend endpoint specified using backendUrl) requires a DayPilot Pro for JavaScript license. The standalone usage of the JavaScript files has been limited by the license since the introduction of DayPilot Pro for JavaScript in 2013. See also the license agreement for details.