Package org.apache.catalina

Examples of org.apache.catalina.DefaultContext


            }
        }

        // Store nested <DefaultContext> element
        if (host instanceof StandardHost) {
            DefaultContext dcontext =
                ((StandardHost) host).getDefaultContext();
            if (dcontext != null) {
                Container parent = host.getParent();
                if ((parent != null) &&
                    (parent instanceof StandardEngine)) {
                    DefaultContext pcontext =
                        ((StandardEngine) parent).getDefaultContext();
                    if (dcontext != pcontext) {
                        storeDefaultContext(writer, indent + 2, dcontext);
                    }
                }
View Full Code Here


     *
     * @param defaultContext The newly associated DefaultContext
     */
    public void setDefaultContext(DefaultContext defaultContext) {

        DefaultContext oldDefaultContext = this.defaultContext;
        this.defaultContext = defaultContext;
        support.firePropertyChange("defaultContext", oldDefaultContext, this.defaultContext);

    }
View Full Code Here

     *
     * @param defaultContext The new DefaultContext
     */
    public void addDefaultContext(DefaultContext defaultContext) {

        DefaultContext oldDefaultContext = this.defaultContext;
        this.defaultContext = defaultContext;
        support.firePropertyChange("defaultContext",
                                   oldDefaultContext, this.defaultContext);

    }
View Full Code Here

            String pathStr = getPathStr(pname.getKeyProperty("path"));
            Context context = (Context) host.findChild(pathStr);
            context.setManager(manager);
        } else if ((type != null) && (type.equals("DefaultContext"))) {
            String hostName = pname.getKeyProperty("host");
            DefaultContext defaultContext = null;
            if (hostName == null) {
                defaultContext = engine.getDefaultContext();
            } else {
                Host host = (Host)engine.findChild(hostName);
                defaultContext = host.getDefaultContext();
            }
            if (defaultContext != null ){
                manager.setDefaultContext(defaultContext);
                defaultContext.setManager(manager);
            }
        }

        // Return the corresponding MBean name
        ManagedBean managed = registry.findManagedBean("StandardManager");
View Full Code Here

            String pathStr = getPathStr(pname.getKeyProperty("path"));
            Context context = (Context) host.findChild(pathStr);
            context.setLoader(loader);
        } else if ((type != null) && (type.equals("DefaultContext"))) {
            String hostName = pname.getKeyProperty("host");
            DefaultContext defaultContext = null;
            if (hostName == null) {
                defaultContext = engine.getDefaultContext();
            } else {
                Host host = (Host)engine.findChild(hostName);
                defaultContext = host.getDefaultContext();
            }
            if (defaultContext != null ){
                loader.setDefaultContext(defaultContext);
                defaultContext.setLoader(loader);
            }
        }

        // Return the corresponding MBean name
        ManagedBean managed = registry.findManagedBean("WebappLoader");
View Full Code Here

            Host host = (Host) engine.findChild(hostName);
            Context context = (Context) host.findChild(contextName);
            // Remove this component from its parent component
            context.setLoader(null);
        } else if ((type != null) && (type.equals("DefaultLoader"))) {
            DefaultContext defaultContext = null;
            if (hostName == null) {   
                defaultContext = engine.getDefaultContext();
            } else {
                Host host = (Host) engine.findChild(hostName);
                defaultContext = host.getDefaultContext();
            }
            if (defaultContext != null) {
                // Remove this component from its parent component
                defaultContext.setLoader(null);
            }
        }
   
    }
View Full Code Here

            Host host = (Host) engine.findChild(hostName);
            Context context = (Context) host.findChild(contextName);
            // Remove this component from its parent component
            context.setManager(null);
        } else if ((type != null) && (type.equals("DefaultManager"))) {
            DefaultContext defaultContext = null;
            if (hostName == null) {   
                defaultContext = engine.getDefaultContext();
            } else {
                Host host = (Host) engine.findChild(hostName);
                defaultContext = host.getDefaultContext();
            }
            if (defaultContext != null) {
                // Remove this component from its parent component
                defaultContext.setManager(null);
            }
        }

    }
View Full Code Here

        storeAttributes(writer, engine);
        writer.println(">");

        // Store nested <DefaultContext> element
        if (engine instanceof StandardEngine) {
            DefaultContext dcontext =
                ((StandardEngine) engine).getDefaultContext();
            if (dcontext != null) {
                storeDefaultContext(writer, indent + 2, dcontext);
            }
        }
View Full Code Here

            }
        }

        // Store nested <DefaultContext> element
        if (host instanceof StandardHost) {
            DefaultContext dcontext =
                ((StandardHost) host).getDefaultContext();
            if (dcontext != null) {
                Container parent = host.getParent();
                if ((parent != null) &&
                    (parent instanceof StandardEngine)) {
                    DefaultContext pcontext =
                        ((StandardEngine) parent).getDefaultContext();
                    if (dcontext != pcontext) {
                        storeDefaultContext(writer, indent + 2, dcontext);
                    }
                }
View Full Code Here

     *
     * @param defaultContext The new DefaultContext
     */
    public void addDefaultContext(DefaultContext defaultContext) {

        DefaultContext oldDefaultContext = this.defaultContext;
        this.defaultContext = defaultContext;
        support.firePropertyChange("defaultContext",
                                   oldDefaultContext, this.defaultContext);

    }
View Full Code Here

TOP

Related Classes of org.apache.catalina.DefaultContext

Copyright © 2018 www.massapicom. 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.