Package org.apache.catalina

Examples of org.apache.catalina.Context.addChild()


        // Without a servlet the filter will not get run.
        final Wrapper wrapper = context.createWrapper();
        final String name = "DefaultServlet";
        wrapper.setName(name);
        wrapper.setServletClass(DefaultServlet.class.getName());
        context.addChild(wrapper);
        context.addServletMapping("/", name);

        File contextConfigFile = new File(webappFolder, "META-INF/context.xml");

        if (contextConfigFile.exists())
View Full Code Here


            wrapper = new ServletWrapper(servlet);
        }
        Context context = port.getHost().map(path);
        wrapper.setName(path);
        wrapper.addMapping(path);
        context.addChild(wrapper);
        context.addServletMapping(path, path);
        port.getConnector().getMapper().addWrapper("localhost", "", path, wrapper);

        // Initialize the servlet
        try {
View Full Code Here

                mapping = completePath.substring(0, completePath.length() - 1);
            }
            mapping = mapping + "/*";
        }

        context.addChild(wrapper);
        wrapper.addMapping(removeWebContext(webContext, mapping));
        context.addServletMapping(mapping, name);

        final String listenerId = wrapper.getName() + RsServlet.class.getName() + listener.hashCode();
        wrapper.addInitParameter(HttpListener.class.getName(), listenerId);
View Full Code Here

        }

        wrapper = context.createWrapper();
        wrapper.setName(HESSIAN.replace("/", "") + "_" + name);
        wrapper.setServlet(new OpenEJBHessianServlet(listener));
        context.addChild(wrapper);
        context.addServletMapping(servletMapping, wrapper.getName());

        if ("BASIC".equals(authMethod) && StandardContext.class.isInstance(context)) {
            final StandardContext standardContext = StandardContext.class.cast(context);
View Full Code Here

        setWsContainer(context, wrapper, httpListener);
        wrapper.addMapping("/*");


        // add add servlet to context
        context.addChild(wrapper);
        context.addServletMapping("/*", "webservice");

        // add context to host
        host.addChild(context);
        webserviceContexts.put(path, context);
View Full Code Here

            wrapper = new ServletWrapper(servlet);
        }
        Context context = port.getHost().map(path);
        wrapper.setName(path);
        wrapper.addMapping(path);
        context.addChild(wrapper);
        context.addServletMapping(path, path);
        port.getConnector().getMapper().addWrapper("localhost", "", path, wrapper);

        // Initialize the Servlet
        try {
View Full Code Here

        String mapping = URI.create(uri).getPath();
        Context context = host.map(mapping);
        Wrapper wrapper = new ServletWrapper(servlet);
        wrapper.setName(mapping);
        wrapper.addMapping(mapping);
        context.addChild(wrapper);
        context.addServletMapping(mapping, mapping);
        connector.getMapper().addWrapper("localhost", "", mapping, wrapper);
    }

    public Servlet removeServletMapping(String uri) {
View Full Code Here

            wrapper = new ServletWrapper(servlet);
        }
        Context context = port.getHost().map(path);
        wrapper.setName(path);
        wrapper.addMapping(path);
        context.addChild(wrapper);
        context.addServletMapping(path, path);
        port.getConnector().getMapper().addWrapper("localhost", "", path, wrapper);

        // Initialize the servlet
        try {
View Full Code Here

        // Without a servlet the filter will not get run.
        final Wrapper wrapper = context.createWrapper();
        final String name = "DefaultServlet";
        wrapper.setName(name);
        wrapper.setServletClass(DefaultServlet.class.getName());
        context.addChild(wrapper);
        context.addServletMapping("/", name);

        File contextConfigFile = new File(webappFolder, "META-INF/context.xml");

        if (contextConfigFile.exists())
View Full Code Here

        setWsContainer(context, wrapper, httpListener);
        wrapper.addMapping("/*");


        // add add servlet to context
        context.addChild(wrapper);
        context.addServletMapping("/*", "webservice");

        // add context to host
        host.addChild(context);
        webserviceContexts.put(path, context);
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.