code: protected void initListener(XmlParser.Node node)
      {
          String className=node.getString("listener-class",false,true);
          Object listener=null;
          try
          {
              Class listenerClass=getWebApplicationContext().loadClass(className);
              listener=listenerClass.newInstance();
          }
          catch(Exception e)
          {
              log.warn("Could not instantiate listener "+className,e);
              return;
          }
          if(!(listener instanceof EventListener))
          {
              log.warn("Not an EventListener: "+listener);
              return;
          }
          boolean known=false;
          try
          {
              getWebApplicationContext().addEventListener((EventListener)listener);
              known=true;
          }
          catch(Exception e)
          {
              LogSupport.ignore(log,e);
          }
          try
          {
              getWebApplicationHandler().addEventListener((EventListener)listener);
              known=true;
          }
          catch(Exception e)
          {
              LogSupport.ignore(log,e);
          }
          if(!known)
              log.warn("Unknown: "+listener);
      }
docs: /* ------------------------------------------------------------