code: @Override
      public void doStart() throws Exception
      {
          log.info("starting...");
          super.doStart();
          if (_cookieDomain == null)
          {
              String[] cookieDomains = getContextHandler().getVirtualHosts();
              // commented as api dropped in jetty9
              //if (cookieDomains == null || cookieDomains.length == 0)
              //{
              //    cookieDomains = getContextHandler().getConnectorNames();
              //}
              if (cookieDomains == null || cookieDomains.length == 0)
              {
                  cookieDomains = new String[] {
                      "*"
                  };
              }
              this._cookieDomain = cookieDomains[0];
          }
          if (_cookiePath == null)
          {
              String cookiePath = getContext().getContextPath();
              if (cookiePath == null || "".equals(cookiePath))
              {
                  cookiePath = "*";
              }
              this._cookiePath = cookiePath;
          }
          if (sessionFactory == null)
          {
              sessionFactory = new SerializableSessionFactory();
          }
          log.info("use " + sessionFactory.getClass().getSimpleName() + " as session factory.");
          try
          {
              // use context class loader during object deserialization.
              // thanks Daniel Peters!
              ClassLoader cl = getContext().getClassLoader();
              if (cl != null) {
                  sessionFactory.setClassLoader(cl);
                  log.info("use context class loader for session deserializer.");
              }
              // FIXME: is there any safe way to refer context's class loader?
              // getContext().getClassLoader() may raise SecurityException.
              // this will be determine by policy configuration of JRE.
          }
          catch (SecurityException error)
          {
          }
          log.info("started.");
      }
docs: /*------------------------------------------------------------