Examples of ContextName


Examples of org.apache.catalina.util.ContextName

        if (container instanceof Server) {
            name = new ObjectName(domain + ":type=Environment" +
                        ",resourcetype=Global,name=" + environment.getName());
        } else if (container instanceof Context) {       
            Context context = ((Context)container);
            ContextName cn = new ContextName(context.getName());
            Container host = context.getParent();
            name = new ObjectName(domain + ":type=Environment" +
                        ",resourcetype=Context,context=" + cn.getDisplayName() +
                        ",host=" + host.getName() +
                        ",name=" + environment.getName());
        }       
        return (name);
View Full Code Here

Examples of org.apache.catalina.util.ContextName

            name = new ObjectName(domain + ":type=Resource" +
                        ",resourcetype=Global,class=" + resource.getType() +
                        ",name=" + quotedResourceName);
        } else if (container instanceof Context) {                   
            Context context = ((Context)container);
            ContextName cn = new ContextName(context.getName());
            Container host = context.getParent();
            name = new ObjectName(domain + ":type=Resource" +
                        ",resourcetype=Context,context=" + cn.getDisplayName() +
                        ",host=" + host.getName() +
                        ",class=" + resource.getType() +
                        ",name=" + quotedResourceName);
        }
       
View Full Code Here

Examples of org.apache.catalina.util.ContextName

            name = new ObjectName(domain + ":type=ResourceLink" +
                        ",resourcetype=Global" +
                        ",name=" + quotedResourceLinkName);
        } else if (container instanceof Context) {                   
            Context context = ((Context)container);
            ContextName cn = new ContextName(context.getName());
            Container host = context.getParent();
            name = new ObjectName(domain + ":type=ResourceLink" +
                        ",resourcetype=Context,context=" + cn.getDisplayName() +
                        ",host=" + host.getName() +
                        ",name=" + quotedResourceLinkName);
        }
       
        return (name);
View Full Code Here

Examples of org.apache.catalina.util.ContextName

        } else if (container instanceof Host) {
            name = new ObjectName(domain + ":type=Loader,host=" +
                              container.getName());
        } else if (container instanceof Context) {
            Context context = ((Context)container);
            ContextName cn = new ContextName(context.getName());
            Container host = context.getParent();
            name = new ObjectName(domain + ":type=Loader,context=" +
                    cn.getDisplayName() + ",host=" + host.getName());
        }

        return (name);

    }
View Full Code Here

Examples of org.apache.catalina.util.ContextName

        } else if (container instanceof Host) {
            name = new ObjectName(domain + ":type=Manager,host=" +
                              container.getName());
        } else if (container instanceof Context) {
            Context context = ((Context)container);
            ContextName cn = new ContextName(context.getName());
            Container host = context.getParent();
            name = new ObjectName(domain + ":type=Manager,context=" +
                    cn.getDisplayName() + ",host=" + host.getName());
        }

        return (name);

    }
View Full Code Here

Examples of org.apache.catalina.util.ContextName

        if (container instanceof Server) {       
            name = new ObjectName(domain + ":type=NamingResources" +
                        ",resourcetype=Global");
        } else if (container instanceof Context) {       
            Context context = ((Context)container);
            ContextName cn = new ContextName(context.getName());
            Container host = context.getParent();
            name = new ObjectName(domain + ":type=NamingResources" +
                        ",resourcetype=Context,context=" + cn.getDisplayName() +
                        ",host=" + host.getName());
        }
       
        return (name);
View Full Code Here

Examples of org.apache.catalina.util.ContextName

        } else if (container instanceof Host) {
            name = new ObjectName(domain + ":type=Realm,host=" +
                              container.getName());
        } else if (container instanceof Context) {
            Context context = ((Context)container);
            ContextName cn = new ContextName(context.getName());
            Container host = context.getParent();
            name = new ObjectName(domain + ":type=Realm,context=" +
                    cn.getDisplayName() + ",host=" + host.getName());
        }

        return (name);

    }
View Full Code Here

Examples of org.apache.catalina.util.ContextName

            }
            name = new ObjectName(domain + ":type=Valve,name=" + className +
                                    ext + local );
        } else if (container instanceof Context) {
            Context context = ((Context)container);
            ContextName cn = new ContextName(context.getName());
            Container host = context.getParent();
            String local=",context=" + cn.getDisplayName() + ",host=" +
                    host.getName();
            int seq = getSeq(local);
            String ext="";
            if( seq > 0 ) {
                ext=",seq=" + seq;
View Full Code Here

Examples of org.apache.catalina.util.ContextName

            if (c instanceof Wrapper) {
                keyProperties.append(",servlet=");
                keyProperties.append(c.getName());
            } else if (c instanceof Context) {
                keyProperties.append(",context=");
                ContextName cn = new ContextName(c.getName());
                keyProperties.append(cn.getDisplayName());
            } else if (c instanceof Host) {
                keyProperties.append(",host=");
                keyProperties.append(c.getName());
            } else if (c == null) {
                // May happen in unit testing and/or some embedding scenarios
View Full Code Here

Examples of org.apache.catalina.util.ContextName

            // Trying to guess the docBase according to the path
            String path = context.getPath();
            if (path == null) {
                return;
            }
            ContextName cn = new ContextName(path, context.getWebappVersion());
            docBase = cn.getBaseName();
        }

        File file = new File(docBase);
        if (!file.isAbsolute()) {
            docBase = (new File(canonicalAppBase, docBase)).getPath();
        } else {
            docBase = file.getCanonicalPath();
        }
        file = new File(docBase);
        String origDocBase = docBase;
       
        ContextName cn = new ContextName(context.getPath(),
                context.getWebappVersion());
        String pathName = cn.getBaseName();

        if (docBase.toLowerCase(Locale.ENGLISH).endsWith(".war") && !file.isDirectory() && unpackWARs) {
            URL war = new URL("jar:" + (new File(docBase)).toURI().toURL() + "!/");
            docBase = ExpandWar.expand(host, war, pathName);
            file = new File(docBase);
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.