code: public void init(ServletConfig config) throws ServletException {        
          try {
              String idlPath = config.getInitParameter("idl");
              if (idlPath == null) {
                  throw new ServletException("idl init param is required. Set to path to .json file, or classpath:/mycontract.json");
              }
  
              if (idlPath.startsWith("classpath:")) {
                  idlPath = idlPath.substring(10);
                  contract = Contract.load(getClass().getResourceAsStream(idlPath));
              }
              else {
                  contract = Contract.load(new File(idlPath));
              }
              
              server = new Server(contract);
  
              int handlerCount = 0;
              Enumeration params = config.getInitParameterNames();
              while (params.hasMoreElements()) {
                  String key = params.nextElement().toString();
                  if (key.indexOf("handler.") == 0) {
                      String val = config.getInitParameter(key);
                      int pos = val.indexOf("=");
                      if (pos == -1) {
                          throw new ServletException("Invalid init param: key=" + key + 
                                                     " value=" + val +
                                                     " -- should be: interfaceClass=implClass");
                      }
  
                      String ifaceCname = val.substring(0, pos);
                      String implCname  = val.substring(pos+1);
  
                      Class ifaceClazz = Class.forName(ifaceCname);
                      Class implClazz  = Class.forName(implCname);
                      server.addHandler(ifaceClazz, implClazz.newInstance());
                      handlerCount++;
                  }
              }
  
              if (handlerCount == 0) {
                  throw new ServletException("At least one handler.x init property is required");
              }
          }
          catch (ServletException e) {
              throw e;
          }
          catch (Exception e) {
              throw new ServletException(e);
          }
      }
docs: Initializes the servlet based on the init parameters in web.xml