Examples of addContext()


Examples of org.apache.catalina.startup.Tomcat.addContext()

    @Test
    public void testSingleMachine() throws Exception {
        Tomcat tomcat = getTomcatInstance();
        // Must have a real docBase - just use temp
        Context ctx =
            tomcat.addContext("", System.getProperty("java.io.tmpdir"));
        ctx.addApplicationListener(new ApplicationListener(
                TesterEchoServer.Config.class.getName(), false));
        Tomcat.addServlet(ctx, "default", new DefaultServlet());
        ctx.addServletMapping("/", "default");
View Full Code Here

Examples of org.apache.catalina.startup.Tomcat.addContext()

        Tomcat tomcat = getTomcatInstance();
        tomcat.enableNaming();

        // Must have a real docBase - just use temp
        Context ctx =
            tomcat.addContext("", System.getProperty("java.io.tmpdir"));

        Tomcat.addServlet(ctx, "Bug53356", new Bug53356Servlet());
        ctx.addServletMapping("", "Bug53356");

        tomcat.start();
View Full Code Here

Examples of org.apache.catalina.startup.Tomcat.addContext()

    private void doTestNonBlockingRead(boolean ignoreIsReady) throws Exception {
        Tomcat tomcat = getTomcatInstance();

        // Must have a real docBase - just use temp
        StandardContext ctx = (StandardContext) tomcat.addContext("",
                System.getProperty("java.io.tmpdir"));

        NBReadServlet servlet = new NBReadServlet(ignoreIsReady);
        String servletName = NBReadServlet.class.getName();
        Tomcat.addServlet(ctx, servletName, servlet);
View Full Code Here

Examples of org.apache.catalina.startup.Tomcat.addContext()

    @Test
    public void testNonBlockingWrite() throws Exception {
        Tomcat tomcat = getTomcatInstance();
        // Must have a real docBase - just use temp
        StandardContext ctx = (StandardContext) tomcat.addContext("",
                System.getProperty("java.io.tmpdir"));

        NBWriteServlet servlet = new NBWriteServlet();
        String servletName = NBWriteServlet.class.getName();
        Tomcat.addServlet(ctx, servletName, servlet);
View Full Code Here

Examples of org.apache.catalina.startup.Tomcat.addContext()

    @Test
    public void testNonBlockingWriteError() throws Exception {
        Tomcat tomcat = getTomcatInstance();

        // Must have a real docBase - just use temp
        StandardContext ctx = (StandardContext) tomcat.addContext(
                "", System.getProperty("java.io.tmpdir"));

        TesterAccessLogValve alv = new TesterAccessLogValve();
        ctx.getPipeline().addValve(alv);
View Full Code Here

Examples of org.apache.catalina.startup.Tomcat.addContext()

    @Test
    public void testBug55438NonBlockingReadWriteEmptyRead() throws Exception {
        Tomcat tomcat = getTomcatInstance();

        // Must have a real docBase - just use temp
        StandardContext ctx = (StandardContext) tomcat.addContext("",
                System.getProperty("java.io.tmpdir"));

        NBReadWriteServlet servlet = new NBReadWriteServlet();
        String servletName = NBReadWriteServlet.class.getName();
        Tomcat.addServlet(ctx, servletName, servlet);
View Full Code Here

Examples of org.apache.catalina.startup.Tomcat.addContext()

        TesterSupport.initSsl(tomcat);
       
        // Need a web application with a protected and unprotected URL
        // Must have a real docBase - just use temp
        Context ctx =
            tomcat.addContext("", System.getProperty("java.io.tmpdir"));

        Tomcat.addServlet(ctx, "simple", new SimpleServlet());
        ctx.addServletMapping("/unprotected", "simple");
        ctx.addServletMapping("/protected", "simple");
View Full Code Here

Examples of org.apache.tomcat.core.ContextManager.addContext()

        for( i=0; i < ri.length; i++) {
      ri[i].copyContext(request, ctx, ctx1);
        }
        cm.removeContext( ctx );
       
        cm.addContext( ctx1 );

        // put back saved local interceptors
        e=sI.elements();
        while(e.hasMoreElements()){
      BaseInterceptor savedI=(BaseInterceptor)e.nextElement();
View Full Code Here

Examples of org.apache.tomcat.lite.http.BaseMapper.addContext()

        welcomes[0] = "index.html";
        welcomes[1] = "foo.html";

        for (int i = 0; i < 100; i++) {
            String hostN = "test" + i + ".com";
            mapper.addContext(hostN, "", "context0", new String[0], null, null);
            mapper.addContext(hostN, "/foo", "context1", new String[0], null, null);
            mapper.addContext(hostN, "/foo/bar", "context2", welcomes, null, null);
            mapper.addContext(hostN, "/foo/bar/bla", "context3", new String[0], null, null);

            mapper.addWrapper(hostN, "/foo/bar", "/fo/*", "wrapper0");
View Full Code Here

Examples of org.apache.webbeans.container.BeanManagerImpl.addContext()

            } else {
                webBeansContext = new WebappWebBeansContext(services, properties, appContext.getWebBeansContext());
                startupObject.getWebContext().setWebbeansContext(webBeansContext);
            }
            final BeanManagerImpl beanManagerImpl = webBeansContext.getBeanManagerImpl();
            beanManagerImpl.addContext(new TransactionContext());
            beanManagerImpl.addAdditionalInterceptorBindings(Transactional.class);

            SystemInstance.get().fireEvent(new WebBeansContextCreated(webBeansContext));
            OpenEJBTransactionService.class.cast(services.get(TransactionService.class)).setWebBeansContext(webBeansContext);
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.