Package org.apache.catalina.core

Examples of org.apache.catalina.core.StandardContext.addChild()


    ContextConfig ctxCfg = new ContextConfig();
    ctxCfg.setDefaultWebXml(Constants.NoDefaultWebXml);
    context.addLifecycleListener(ctxCfg);

    Wrapper sw = context.createWrapper();
    context.addChild(sw);
    sw.setServletClass("com.example.demo.ClassLoaderServlet");
    sw.setName("info");
    sw.setLoadOnStartup(1);
    sw.addMapping("/info");
     
View Full Code Here


        defaultServlet.setServletName("default");
        defaultServlet.setLoadOnStartup(1);
        defaultServlet.addInitParameter("debug", "0");
        defaultServlet.addInitParameter("listing", "true");
        defaultServlet.addMapping("/");
        context.addChild(defaultServlet);
        context.addServletMapping("/", "default");

        // create the Jasper Servlet instance to mount
        StandardWrapper jspServlet = new StandardWrapper();
        jspServlet.setServletClass("org.apache.jasper.servlet.JspServlet");
View Full Code Here

        jspServlet.setLoadOnStartup(1);
        jspServlet.addInitParameter("fork", "false");
        jspServlet.addInitParameter("xpoweredBy", "true");
        jspServlet.addMapping("*.jsp");
        jspServlet.addMapping("*.jspx");
        context.addChild(jspServlet);
        context.addServletMapping("*.jsp", "jsp");

        // default mime-type mappings
        configureMimeTypes(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.