Example #1
0
 /**
  * For complex configurations, this accessor allows callers of this class to obtain the simple
  * realm created by default.
  *
  * @return the simple in-memory realm created by default.
  * @deprecated Will be removed in Tomcat 8.0.x
  */
 @Deprecated
 public Realm getDefaultRealm() {
   if (defaultRealm == null) {
     initSimpleAuth();
   }
   return defaultRealm;
 }
Example #2
0
 /** Access to the engine, for further customization. */
 public Engine getEngine() {
   if (engine == null) {
     getServer();
     engine = new StandardEngine();
     engine.setName("Tomcat");
     engine.setDefaultHost(hostname);
     if (defaultRealm == null) {
       initSimpleAuth();
     }
     engine.setRealm(defaultRealm);
     service.setContainer(engine);
   }
   return engine;
 }