Package io.undertow.servlet.api

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


                .setResourceManager(new TestResourceLoader(ContentTypeServlet.class))
                .setDefaultServletConfig(new DefaultServletConfig(true))
                .addMimeMapping(new MimeMapping("jnlp", "application/x-java-jnlp-file"));

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

    @Test
View Full Code Here


                            servlet("MyServlet", MessageServlet.class)
                                    .addInitParam("message", "MyServlet")
                                    .addMapping("/myservlet"));

            DeploymentManager manager = defaultContainer().addDeployment(servletBuilder);
            manager.deploy();

            Undertow server = Undertow.builder()
                    .addListener(8080, "localhost")
                    .setHandler(manager.start())
                    .build();
View Full Code Here

                )
                .setDeploymentName("chat.war");


        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        try {
            path.addPrefixPath("/", manager.start());
        } catch (ServletException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        }
    }

    public void deploy(DeploymentInfo deploymentInfo) {
        DeploymentManager manager = container.addDeployment(deploymentInfo);
        manager.deploy();
        try {
            root.addPath(deploymentInfo.getContextPath(), manager.start());
        } catch (ServletException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

    * @return
    */
   public UndertowJaxrsServer deploy(DeploymentInfo builder)
   {
      DeploymentManager manager = container.addDeployment(builder);
      manager.deploy();
      try
      {
         root.addPath(builder.getContextPath(), manager.start());
      }
      catch (ServletException e)
View Full Code Here

            .setServletStackTraces(ServletStackTraces.NONE)
            .addServlet(servlet);
        JspServletBuilder.setupDeployment(builder, new HashMap<String, JspPropertyGroup>(), new HashMap<String, TagLibraryInfo>(), new HackInstanceManager());

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

        DefaultServer.setRootHandler(servletPath);

        try (CloseableHttpClient client = HttpClients.createDefault()) {
View Full Code Here

                            servlet("MyServlet", MessageServlet.class)
                                    .addInitParam("message", "MyServlet")
                                    .addMapping("/myservlet"));

            DeploymentManager manager = defaultContainer().addDeployment(servletBuilder);
            manager.deploy();

            HttpHandler servletHandler = manager.start();
            PathHandler path = Handlers.path(Handlers.redirect(MYAPP))
                    .addPrefixPath(MYAPP, servletHandler);
            Undertow server = Undertow.builder()
View Full Code Here

                    .addFilterUrlMapping("filter", "/*", DispatcherType.REQUEST);

            deployment.addEndpoint(new ServerEndpointConfigImpl(ProgramaticAutobahnEndpoint.class, "/"));

            DeploymentManager manager = container.addDeployment(builder);
            manager.deploy();


            openListener.setRootHandler(manager.start());
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

                .addServletContextAttribute(javax.websocket.server.ServerContainer.class.getName(), deployment);

        final PathHandler root = new PathHandler();
        final ServletContainer container = ServletContainer.Factory.newInstance();
        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();
        root.addPrefixPath(builder.getContextPath(), manager.start());

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

                )
                .setDeploymentName("servletContext.war");


        DeploymentManager manager = container.addDeployment(builder);
        manager.deploy();


        DefaultServer.setRootHandler(manager.start());
        DefaultServer.startSSLServer();
    }
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.