Package io.undertow.servlet.api

Examples of io.undertow.servlet.api.DeploymentManager


                        .addRoleAllowed("role1")
                        .addWebResourceCollection(new WebResourceCollection()
                                .addUrlPattern("/index.html")));


        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());

        DefaultServer.setRootHandler(root);
    }
View Full Code Here


                .setDeploymentName("servletContext.war")
                .setEagerFilterInit(true)
                .addFilter(f)
                .addFilterUrlMapping("filter", "/aa", DispatcherType.REQUEST);

        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());

        DefaultServer.setRootHandler(root);

        Assert.assertTrue(LifecycleFilter.initCalled);
    }
View Full Code Here

                .setServletStackTraces(ServletStackTraces.NONE)
                .setIdentityManager(identityManager)
                .setLoginConfig(Servlets.loginConfig("BASIC", "Test Realm"))
                .setDeploymentName("servletContext.war");

        final DeploymentManager manager1 = container.addDeployment(builder);
        manager1.deploy();
        root.addPrefixPath(builder.getContextPath(), manager1.start());

    }
View Full Code Here

        builder.addFilter(new FilterInfo("Filter", HelloFilter.class));
        builder.addFilterUrlMapping("Filter", "/filterpath/*", DispatcherType.REQUEST);
        builder.setMetricsCollector(metricsCollector);

        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());

        DefaultServer.setRootHandler(completionLatchHandler = new CompletionLatchHandler(root));
    }
View Full Code Here

                            }
                        };
                    }
                });

        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());

        DefaultServer.setRootHandler(root);
    }
View Full Code Here

                .setDeploymentName("servletContext.war")
                .addServlet(s)
                .addFilter(f)
                .addFilterUrlMapping("filter", "/aa", DispatcherType.REQUEST);

        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());

        DefaultServer.setRootHandler(root);

        TestHttpClient client = new TestHttpClient();
        try {
            HttpGet get = new HttpGet(DefaultServer.getDefaultServerURL() + "/servletContext/aa");
            HttpResponse result = client.execute(get);
            Assert.assertEquals(StatusCodes.OK, result.getStatusLine().getStatusCode());
            final String response = HttpClientUtils.readResponse(result);

            manager.stop();
            manager.undeploy();

            Assert.assertTrue(LifeCycleServlet.initCalled);
            Assert.assertTrue(LifeCycleServlet.destroyCalled);
            Assert.assertTrue(LifecycleFilter.initCalled);
            Assert.assertTrue(LifecycleFilter.destroyCalled);
View Full Code Here

                .setContextPath("/servletContext")
                .setClassIntrospecter(TestClassIntrospector.INSTANCE)
                .setDeploymentName("servletContext.war")
                .addServlet(s);

        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        deployment = manager.getDeployment();
        root.addPrefixPath(builder.getContextPath(), manager.start());

        DefaultServer.setRootHandler(root);
    }
View Full Code Here

                .addFilterUrlMapping("notIncluded", "/include", DispatcherType.REQUEST)
                .addFilterUrlMapping("inc", "/include", DispatcherType.INCLUDE)
                .addFilterServletNameMapping("nameFilter", "include", DispatcherType.INCLUDE);


        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());

        DefaultServer.setRootHandler(root);
    }
View Full Code Here

                .setContextPath("/includer")
                .setClassIntrospecter(TestClassIntrospector.INSTANCE)
                .setDeploymentName("includer.war")
                .addServlet(s);

        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());


        s = new ServletInfo("included", IncludedServlet.class)
                .addMapping("/a");

        builder = new DeploymentInfo()
                .setClassLoader(new TempClassLoader("IncludedClassLoader"))
                .setContextPath("/included")
                .setClassIntrospecter(TestClassIntrospector.INSTANCE)
                .setDeploymentName("included.war")
                .addServlet(s);

        manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());

        DefaultServer.setRootHandler(root);
    }
View Full Code Here


        builder.addFilter(new FilterInfo("Filter", HelloFilter.class));
        builder.addFilterUrlMapping("Filter", "/filterpath/*", DispatcherType.REQUEST);

        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());

        DefaultServer.setRootHandler(root);
    }
View Full Code Here

TOP

Related Classes of io.undertow.servlet.api.DeploymentManager

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.