THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
No Format |
---|
Server server = ServerFactory.getServer(); //Note, this assumes the Container is "Catalina" Service service = server.findService("Catalina"); Engine engine = (Engine) service.getContainer(); Host host = (Host) engine.findChild(engine.getDefaultHost()); //Note, this assumes your context is "myContext" Context context = (Context) host.findChild("myContext"); Realm realm = context.getRealm(); |
...