Package io.undertow.servlet.api

Examples of io.undertow.servlet.api.DeploymentManager.deploy()


                .setDeploymentName("servletContext.war")
                .addServlets(a)
                .addListener(new ListenerInfo(SimpleRequestListener.class));

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

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


                        servlet("request", RequestPathServlet.class)
                                .addMapping("/"),
                        servlet("redirect", RedirectServlet.class)
                                .addMapping("/redirect/*"));
        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        try {
            pathHandler.addPrefixPath(builder.getContextPath(), manager.start());
        } catch (ServletException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

                .addListener(new ListenerInfo(SimpleSessionListener.class))
                .addServlet(new ServletInfo("servlet", SessionServlet.class)
                    .addMapping("/test"));

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

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

                .setDeploymentName("servletContext.war")
                .addListener(new ListenerInfo(ChangeSessionIdListener.class))
                .addServlet(s);

        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        path.addPrefixPath(builder.getContextPath(), manager.start());
        DefaultServer.setRootHandler(path);
    }

View Full Code Here

                .setSessionPersistenceManager(new InMemorySessionPersistence())
                .setServletSessionConfig(new ServletSessionConfig().setPath("/servletContext/aa"))
                .addServlets(new ServletInfo("servlet", SessionServlet.class)
                        .addMapping("/aa/b"));
        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        try {
            pathHandler.addPrefixPath(builder.getContextPath(), manager.start());
        } catch (ServletException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

            response = HttpClientUtils.readResponse(result);
            Assert.assertEquals("2", response);

            manager.stop();
            manager.undeploy();
            manager.deploy();
            pathHandler.addPrefixPath(builder.getContextPath(), manager.start());

            result = client.execute(get);
            Assert.assertEquals(StatusCodes.OK, result.getStatusLine().getStatusCode());
            response = HttpClientUtils.readResponse(result);
View Full Code Here

                                 .setLoginConfig(new LoginConfig("FORM", "Test Realm", "/FormLoginServlet", "/error.html"))
                                 .addServlets(securedRequestDumper, unsecuredRequestDumper, loginFormServlet);

        DeploymentManager manager = container.addDeployment(builder);

        manager.deploy();

        path.addPrefixPath(builder.getContextPath(), manager.start());

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

                .setDeploymentName( name + ".war")
                .setServletSessionConfig(new ServletSessionConfig().setPath("/"))
                .addServlets(s, forward);

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


    @Test
View Full Code Here

                .setIdentityManager(identityManager)
                .setLoginConfig(new LoginConfig("FORM", "Test Realm", "/FormLoginServlet", "/error.html"))
                .addServlets(s, s1, echo,echoParam);

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

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

                .setDeploymentName("servletContext.war")
                .addServlets(m, a, a2)
                .addListener(new ListenerInfo(TestListener.class));

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

        DefaultServer.setRootHandler(root);
    }
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.