Package org.apache.catalina

Examples of org.apache.catalina.Container


        return base;
    }

    public String getConfigBase() {
        File configBase = new File(System.getProperty("catalina.base"), "conf");
        Container container = host;
        Container host = null;
        Container engine = null;
        while (container != null) {
            if (container instanceof Host) {
                host = container;
            }
            if (container instanceof Engine) {
                engine = container;
            }
            container = container.getParent();
        }
        if (engine != null) {
            configBase = new File(configBase, engine.getName());
        }
        if (host != null) {
            configBase = new File(configBase, host.getName());
        }
        return configBase.getAbsolutePath();
View Full Code Here


        return initParams;
    }

    public static ServletInfo getApplicationServlet(Context context, String servletName) {
        Container c = context.findChild(servletName);

        if (c instanceof Wrapper) {
            Wrapper w = (Wrapper) c;
            return getServletInfo(w, context.getName());
        } else {
View Full Code Here

                if (sn != null) {
                    ServletMapping sm = new ServletMapping();
                    sm.setApplicationName(context.getName().length() > 0 ? context.getName() : "/");
                    sm.setUrl(sms[i]);
                    sm.setServletName(sn);
                    Container c = context.findChild(sn);
                    if (c instanceof Wrapper) {
                        Wrapper w = (Wrapper) c;
                        sm.setServletClass(w.getServletClass());
                        sm.setAvailable(! w.isUnavailable());
                    }
View Full Code Here

        return base;
    }

    public String getConfigBase() {
        File configBase = new File(System.getProperty("catalina.base"), "conf");
        Container container = host;
        Container host = null;
        Container engine = null;
        while (container != null) {
            if (container instanceof Host) {
                host = container;
            }
            if (container instanceof Engine) {
                engine = container;
            }
            container = container.getParent();
        }
        if (engine != null) {
            configBase = new File(configBase, engine.getName());
        }
        if (host != null) {
            configBase = new File(configBase, host.getName());
        }
        return configBase.getAbsolutePath();
View Full Code Here

        return base;
    }

    public String getConfigBase() {
        File configBase = new File(System.getProperty("catalina.base"), "conf");
        Container container = host;
        Container host = null;
        Container engine = null;
        while (container != null) {
            if (container instanceof Host) {
                host = container;
            }
            if (container instanceof Engine) {
                engine = container;
            }
            container = container.getParent();
        }
        if (engine != null) {
            configBase = new File(configBase, engine.getName());
        }
        if (host != null) {
            configBase = new File(configBase, host.getName());
        }
        return configBase.getAbsolutePath();
View Full Code Here

        return base;
    }

    public String getConfigBase() {
        File configBase = new File(System.getProperty("catalina.base"), "conf");
        Container container = (Container) deployer;
        Container host = null;
        Container engine = null;
        while (container != null) {
            if (container instanceof Host) {
                host = container;
            }
            if (container instanceof Engine) {
                engine = container;
            }
            container = container.getParent();
        }
        if (engine != null) {
            configBase = new File(configBase, engine.getName());
        }
        if (host != null) {
            configBase = new File(configBase, host.getName());
        }
        return configBase.getAbsolutePath();
View Full Code Here

     * @param standardContext that will be used to compute the standard context.
     * @return the naming context full name.
     */
    private String getNamingContextName(final StandardContext standardContext) {
        String namingContextName = null;
        Container parent = standardContext.getParent();
        if (parent == null) {
            namingContextName = standardContext.getName();
        } else {
            Stack<String> stk = new Stack<String>();
            StringBuffer buff = new StringBuffer();
            while (parent != null) {
                stk.push(parent.getName());
                parent = parent.getParent();
            }
            while (!stk.empty()) {
                buff.append("/" + stk.pop());
            }
            buff.append(standardContext.getName());
View Full Code Here

    * @param context Context of the web application
    * @return
    */
   private Engine getCatalinaEngine(org.apache.catalina.Context context)
   {
      Container parentContainer = context.getParent();
      while(parentContainer != null && !(parentContainer instanceof Engine))
         parentContainer = parentContainer.getParent();
      return (Engine) parentContainer;
   }
View Full Code Here

   }
  
   private FullyQualifiedSessionId getFullyQualifiedSessionId(Session session)
   {
      String id = session.getIdInternal();
      Container context = session.getManager().getContainer();
      String contextName = context.getName();
      Container host = context.getParent();
      String hostName = host.getName();
     
      return new FullyQualifiedSessionId(id, contextName, hostName);
   }
View Full Code Here

      if (annotations != null)
      {
         for (AnnotationMetaData annotation : annotations)
         {
            String className = annotation.getClassName();
            Container wrappers[] = context.findChildren();
            for (int i = 0; i < wrappers.length; i++) {
                Wrapper wrapper = (Wrapper) wrappers[i];
                if (className.equals(wrapper.getServletClass()))
                {
                  
View Full Code Here

TOP

Related Classes of org.apache.catalina.Container

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.