Package org.apache.catalina

Examples of org.apache.catalina.Host.findChild()


        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);
        Context context = (Context) host.findChild(pathStr);
        // Remove this component from its parent component
        host.removeChild(context);

    }
View Full Code Here


        try {
            Host host = (Host) context.getParent();
            Context child = null;
            String mapuri = uri;
            while (true) {
                child = (Context) host.findChild(mapuri);
                if (context != null)
                    break;
                int slash = mapuri.lastIndexOf('/');
                if (slash < 0)
                    break;
View Full Code Here

                if (slash < 0)
                    break;
                mapuri = mapuri.substring(0, slash);
            }
            if (child == null) {
                child = (Context) host.findChild("");
            }
            if (child != null)
                return (child.getServletContext());
            else
                return (null);
View Full Code Here

            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")) {
                return engine;
            } else if (type.equals("Host")) {
View Full Code Here

        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);
        Context context = (Context) host.findChild(pathStr);
        // Remove this component from its parent component
        host.removeChild(context);

    }
View Full Code Here

        Context child = null;
        try {
            Host host = (Host) context.getParent();
            String mapuri = uri;
            while (true) {
                child = (Context) host.findChild(mapuri);
                if (child != null)
                    break;
                int slash = mapuri.lastIndexOf('/');
                if (slash < 0)
                    break;
View Full Code Here

        Context child = null;
        try {
            Host host = (Host) context.getParent();
            String mapuri = uri;
            while (true) {
                child = (Context) host.findChild(mapuri);
                if (child != null)
                    break;
                int slash = mapuri.lastIndexOf('/');
                if (slash < 0)
                    break;
View Full Code Here

        // Deploy the copied war
        tomcat.start();
        host.backgroundProcess();

        // Check the Context class
        Context ctxt = (Context) host.findChild(APP_NAME.getName());

        Assert.assertTrue(ctxt instanceof TesterContext);
    }

View Full Code Here

        try {
            Host host = (Host) context.getParent();
            Context child = null;
            String mapuri = uri;
            while (true) {
                child = (Context) host.findChild(mapuri);
                if (child != null)
                    break;
                int slash = mapuri.lastIndexOf('/');
                if (slash < 0)
                    break;
View Full Code Here

                if (slash < 0)
                    break;
                mapuri = mapuri.substring(0, slash);
            }
            if (child == null) {
                child = (Context) host.findChild("");
            }
            if (child != null)
                return (child.getServletContext());
            else
                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.