title: Developing a CalDav server
body: <p>I have a set of events saved in my database (a very special database, so I can't use some popular open-source servers with, say, MySQL). Now I want to build a CalDav server (by Java) so that a user can connect his calendar client to it to retrieve or modify events. I'm new to this so have a lot of questions, hope you guys help me out. </p>
  
  <ol>
  <li><p>What are the general steps? </p></li>
  <li><p>Do I need to offer a servlet? If yes, then what must I return for a request? a JSON or XML or .ics file? </p></li>
  <li><p>When a user subscribe to my calendar, does that mean that his client will pull my server (call the servlet) after an interval.</p></li>
  </ol>
  
  <p><strong>Update:</strong> this is 1-year old question since I first asked but I got quite some upvotes, so I'm obliged to provide some info: I ended up using Milton library <a href="http://milton.io/">http://milton.io/</a>, it abstracts away the servlets, you just have to write functions to return data. The author of the library is quite helpful and informative. The end-result: our caldav server has worked.</p>
  
  <p>I also accept Evert's answer.</p>