Package org.apache.catalina

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


        Container host = engine.findChild(virtualHost);
        if (host == null) {
            throw new IllegalArgumentException("Invalid virtual host '" + virtualHost + "'.  Do you have a matchiing Host entry in the server.xml?");
        }

        Context context = (Context) host.findChild("/" + contextRoot);
        if (context == null) {
            throw new IllegalArgumentException("Could not find web application context " + contextRoot + " in host " + host.getName());
        }

        Wrapper wrapper = (Wrapper) context.findChild(servletName);
View Full Code Here


                throw new IllegalArgumentException("Invalid virtual host '" + engine.getDefaultHost() + "'.  Do you have a matchiing Host entry in the server.xml?");
            }
        }

        final String contextRoot = contextName(app);
        Context context = Context.class.cast(host.findChild(contextRoot));
        if (context == null) {
            Pair<Context, Integer> fakeContext = fakeContexts.get(contextRoot);
            if (fakeContext != null) {
                context = fakeContext.getLeft();
                fakeContext.setValue(fakeContext.getValue() + 1);
View Full Code Here

            Pair<Context, Integer> fakeContext = fakeContexts.get(contextRoot);
            if (fakeContext != null) {
                context = fakeContext.getLeft();
                fakeContext.setValue(fakeContext.getValue() + 1);
            } else {
                context = Context.class.cast(host.findChild(contextRoot));
                if (context == null) {
                    fakeContext = fakeContexts.get(contextRoot);
                    if (fakeContext == null) {
                        context = createNewContext(loader, authMethod, transportGuarantee, realmName, app);
                        fakeContext = new MutablePair<>(context, 1);
View Full Code Here

        }
        if (!contextRoot.startsWith("/") && !contextRoot.isEmpty()) {
            contextRoot = "/" + contextRoot;
        }

        final Context context = (Context) host.findChild(contextRoot);
        if (context == null) {
            throw new IllegalArgumentException("Could not find web application context " + contextRoot + " in host " + host.getName());
        }

        final Wrapper wrapper = (Wrapper) context.findChild(servletInfo.servletName);
View Full Code Here

        final Container host = engine.findChild(virtualHost);
        if (host == null) {
            throw new IllegalArgumentException("Invalid virtual host '" + virtualHost + "'.  Do you have a matchiing Host entry in the server.xml?");
        }

        final Context context = (Context) host.findChild("/" + contextRoot);
        if (context == null) {
            throw new IllegalArgumentException("Could not find web application context " + contextRoot + " in host " + host.getName());
        }

        final Wrapper wrapper = (Wrapper) context.findChild(servletInfo.servletName);
View Full Code Here

            }
            if (!root.startsWith("/") && !root.isEmpty()) {
                root = '/' + root;
            }

            final Context webAppContext = Context.class.cast(host.findChild(root));
            if (webAppContext != null) {
                // sub context = '/' means the service address is provided by webservices
                if (WEBSERVICE_SUB_CONTEXT.equals("/") && path.startsWith("/")) {
                    addServlet(host, webAppContext, path, httpListener, path, addresses, false);
                } else if (WEBSERVICE_SUB_CONTEXT.equals("/") && !path.startsWith("/")) {
View Full Code Here

                                .getOrignalSessionID(), sessionmsg
                                .getBackupSessionID(), sessionmsg
                                .getContextPath()));
            Container host = getCluster().getContainer();
            if (host != null) {
                Context context = (Context) host.findChild(sessionmsg
                        .getContextPath());
                if (context != null) {
                    try {
                        Session session = context.getManager().findSession(
                                sessionmsg.getOrignalSessionID());
View Full Code Here

                host = container.findChild(sessionmsg.getHost());
            } else {
                host = container ;
            }
            if (host != null) {
                Context context = (Context) host.findChild(sessionmsg
                        .getContextPath());
                if (context != null) {
                    try {
                        Session session = context.getManager().findSession(
                                sessionmsg.getOrignalSessionID());
View Full Code Here

                                .getOrignalSessionID(), sessionmsg
                                .getBackupSessionID(), sessionmsg
                                .getContextPath()));
            Container host = getCluster().getContainer();
            if (host != null) {
                Context context = (Context) host.findChild(sessionmsg
                        .getContextPath());
                if (context != null) {
                    try {
                        Session session = context.getManager().findSession(
                                sessionmsg.getOrignalSessionID());
View Full Code Here

                throw new IllegalArgumentException("Invalid virtual host '" + host + "'.  Do you have a matchiing Host entry in the server.xml?");
            }
        }

        final String contextRoot = contextName(app);
        Context context = Context.class.cast(host.findChild(contextRoot));
        if (context == null) {
            Pair<Context, Integer> fakeContext = fakeContexts.get(contextRoot);
            if (fakeContext != null) {
                context = fakeContext.getLeft();
                fakeContext.setValue(fakeContext.getValue() + 1);
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.