Package org.apache.catalina.core

Examples of org.apache.catalina.core.StandardEngine.findChild()


            String name = pname.getKeyProperty("name");
            name = name.substring(2);
            int i = name.indexOf("/");
            String hostName = name.substring(0,i);
            String path = name.substring(i);
            Host host = (Host) engine.findChild(hostName);
            String pathStr = getPathStr(path);
            StandardContext context = (StandardContext)host.findChild(pathStr);
            return context;
        } else if (type != null) {
            if (type.equals("Engine")) {
View Full Code Here


        } else if (type != null) {
            if (type.equals("Engine")) {
                return engine;
            } else if (type.equals("Host")) {
                String hostName = pname.getKeyProperty("host");
                StandardHost host = (StandardHost) engine.findChild(hostName);
                return host;
            }
        }
        return null;
       
View Full Code Here

        if (hostName == null) {            
            // child's container is Engine
            return engine;
        } else if (path == null) {     
            // child's container is Host
            StandardHost host = (StandardHost) engine.findChild(hostName);
            return host;
        } else {               
            // child's container is Context
            StandardHost host = (StandardHost) engine.findChild(hostName);
            path = getPathStr(path);
View Full Code Here

            // child's container is Host
            StandardHost host = (StandardHost) engine.findChild(hostName);
            return host;
        } else {               
            // child's container is Context
            StandardHost host = (StandardHost) engine.findChild(hostName);
            path = getPathStr(path);
            StandardContext context = (StandardContext) host.findChild(path);
            return context;
        }
    }
View Full Code Here

                if (sname.equals(serviceName)) {
                    engine.setLogger(null);
                }
            }
        } else if (path == null) {      // if logger's container is Host
            StandardHost host = (StandardHost) engine.findChild(hostName);
            Logger logger = host.getLogger();
            Container container = logger.getContainer();
            if (container instanceof StandardHost) {
                String hn = ((StandardHost)container).getName();
                StandardEngine se =
View Full Code Here

                if (sname.equals(serviceName)) {
                    engine.setRealm(null);
                }
            }
        } else if (path == null) {      // if realm's container is Host
            StandardHost host = (StandardHost) engine.findChild(hostName);
            Realm realm = host.getRealm();
            Container container = realm.getContainer();
            if (container instanceof StandardHost) {
                String hn = ((StandardHost)container).getName();
                StandardEngine se =
View Full Code Here

                        break;
                    }
                }
            }
        } else if (path == null) {      // if valve's container is Host
            StandardHost host = (StandardHost) engine.findChild(hostName);
            Valve [] valves = host.getValves();
            for (int i = 0; i < valves.length; i++) {
                Container container = ((ValveBase)valves[i]).getContainer();
                if (container instanceof StandardHost) {
                    String hn = ((StandardHost)container).getName();
View Full Code Here

            Service service = getService(pname);
            StandardEngine engine = (StandardEngine) service.getContainer();
            String hostName = pname.getKeyProperty("host");
            if (hostName!=null) {
                StandardHost host =
                    (StandardHost) engine.findChild(hostName);
                return host.getDefaultContext();
            } else {
                return engine.getDefaultContext();
            }
        }
View Full Code Here

            String name = pname.getKeyProperty("name");
            name = name.substring(2);
            int i = name.indexOf("/");
            String hostName = name.substring(0,i);
            String path = name.substring(i);
            Host host = (Host) engine.findChild(hostName);
            String pathStr = getPathStr(path);
            StandardContext context = (StandardContext)host.findChild(pathStr);
            return context;
        } else if (type != null) {
            if (type.equals("Engine")) {
View Full Code Here

        } else if (type != null) {
            if (type.equals("Engine")) {
                return engine;
            } else if (type.equals("Host")) {
                String hostName = pname.getKeyProperty("host");
                StandardHost host = (StandardHost) engine.findChild(hostName);
                return host;
            }
        }
        return null;
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.