public void init(ServletConfig config) throws ServletException {
   
    //Source text loaders:
    TextLoadMgr sourceLoader=templateMgr.getTextLoadMgr();
    List<TextLoaderFactory> factories=getSourceTextLoaderFactories(config);
    if (factories==null)
      throw new RuntimeException("No TextLoaderFactories supplied during initialization");
    for (TextLoaderFactory t: factories) 
      sourceLoader.register(t);
      
    //Create template mgr and the TextLoadMgr that wraps it:
    templateMgr.setTemplateInterceptor(getTemplateInterceptor(config));
  }