Package io.undertow.servlet.api

Examples of io.undertow.servlet.api.ServletInfo


    public static void setup() throws ServletException {

        final PathHandler root = new PathHandler();
        final ServletContainer container = ServletContainer.Factory.newInstance();

        ServletInfo m = new ServletInfo("messageServlet", MessageServlet.class)
                .addInitParam(MessageServlet.MESSAGE, HELLO_WORLD)
                .setAsyncSupported(true)
                .addMapping("/message");


        ServletInfo a = new ServletInfo("asyncServlet", AsyncServlet.class)
                .addInitParam(MessageServlet.MESSAGE, HELLO_WORLD)
                .setAsyncSupported(true)
                .addMapping("/async");

        ServletInfo a2 = new ServletInfo("asyncServlet2", AnotherAsyncServlet.class)
        .setAsyncSupported(true)
        .addMapping("/async2");

        DeploymentInfo builder = new DeploymentInfo()
                .setClassLoader(SimpleServletTestCase.class.getClassLoader())
View Full Code Here


        final PathHandler path = new PathHandler();

        final ServletContainer container = ServletContainer.Factory.newInstance();

        ServletInfo usernameServlet = new ServletInfo("Username Servlet", SendUsernameServlet.class)
                .addMapping("/secured/username");

        ServletInfo authTypeServlet = new ServletInfo("Auth Type Servlet", SendAuthTypeServlet.class)
                .addMapping("/secured/authType");

        ServletIdentityManager identityManager = new ServletIdentityManager();
        identityManager.addUser("user1", "password1", "role1");
View Full Code Here

                .setClassLoader(GetResourceTestCase.class.getClassLoader())
                .setContextPath("/servletContext")
                .setDeploymentName("servletContext.war")
                .setResourceManager(new TestResourceLoader(GetResourceTestCase.class));

        builder.addServlet(new ServletInfo("ReadFileServlet", ReadFileServlet.class)
                .addMapping("/file"));

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

    public static final String ASYNC_SERVLET = "asyncInput";

    @BeforeClass
    public static void setup() throws ServletException {
        DeploymentUtils.setupServlet(
                new ServletInfo(BLOCKING_SERVLET, BlockingInputStreamServlet.class)
                        .addMapping("/" + BLOCKING_SERVLET),
                new ServletInfo(ASYNC_SERVLET, AsyncInputStreamServlet.class)
                        .addMapping("/" + ASYNC_SERVLET)
                        .setAsyncSupported(true));
    }
View Full Code Here

        DeploymentInfo builder = new DeploymentInfo();

        final PathHandler root = new PathHandler();
        final ServletContainer container = ServletContainer.Factory.newInstance();

        builder.addServlet(new ServletInfo("/a/*", PathMappingServlet.class)
                .addMapping("/a/*"));

        builder.addServlet(new ServletInfo("/aa", PathMappingServlet.class)
                .addMapping("/aa"));

        builder.addServlet(new ServletInfo("/", PathMappingServlet.class)
                .addMapping("/"));

        builder.addServlet(new ServletInfo("contextRoot", PathMappingServlet.class)
                .addMapping(""));

        builder.addServlet(new ServletInfo("/myservlet/*", PathMappingServlet.class)
                .addMapping("/myservlet/*"));

        builder.addServlet(new ServletInfo("*.jsp", PathMappingServlet.class)
                .addMapping("*.jsp"));

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

View Full Code Here

    public static void setup() throws ServletException {

        final PathHandler root = new PathHandler();
        final ServletContainer container = ServletContainer.Factory.newInstance();

        ServletInfo f = new ServletInfo("faultyServlet", FaultyServlet.class)
                .addMapping("/faulty");


        ServletInfo a1 = new ServletInfo("asyncServlet1", AsyncServlet1.class)
                .setAsyncSupported(true)
                .addMapping("/async1");

        ServletInfo a2 = new ServletInfo("asyncServlet2", AsyncServlet2.class)
        .setAsyncSupported(true)
        .addMapping("/async2");


        ServletInfo a3 = new ServletInfo("asyncServlet3", AsyncServlet3.class)
        .setAsyncSupported(true)
        .addMapping("/async3");

        DeploymentInfo builder = new DeploymentInfo()
                .setClassLoader(AsyncListenerOnErrorTest.class.getClassLoader())
View Full Code Here

        DeploymentInfo builder = new DeploymentInfo();

        final PathHandler root = new PathHandler();
        final ServletContainer container = ServletContainer.Factory.newInstance();

        builder.addServlet(new ServletInfo("*.jsp", PathMappingServlet.class)
                .addMapping("*.jsp"));

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

View Full Code Here

        DeploymentInfo builder = new DeploymentInfo();

        final PathHandler root = new PathHandler();
        final ServletContainer container = ServletContainer.Factory.newInstance();

        builder.addServlet(new ServletInfo("*.a", PathMappingServlet.class)
                .addMapping("*.a"));

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

View Full Code Here

    public static final int NUM_REQUESTS = 100;

    @BeforeClass
    public static void setup() throws ServletException {
        DeploymentUtils.setupServlet(
                new ServletInfo("racey", RaceyAddServlet.class)
                        .addMapping("/racey"),
                new ServletInfo("single", RaceyAddServlet.class)
                        .addMapping("/single")
                        .setExecutor(executorService = Executors.newSingleThreadExecutor()));
    }
View Full Code Here


    @BeforeClass
    public static void setup() throws ServletException {
        DeploymentUtils.setupServlet(
                new ServletInfo("/a/*", PathMappingServlet.class)
                        .addMapping("/a/*"),
                new ServletInfo("/aa", PathMappingServlet.class)
                        .addMapping("/aa"),
                new ServletInfo("/aa/*", PathMappingServlet.class)
                        .addMapping("/aa/*"),
                new ServletInfo("/a/b/*", PathMappingServlet.class)
                        .addMapping("/a/b/*"),
                new ServletInfo("/", PathMappingServlet.class)
                        .addMapping("/"),
                new ServletInfo("*.jsp", PathMappingServlet.class)
                        .addMapping("*.jsp"),
                new ServletInfo("contextRoot", PathMappingServlet.class)
                        .addMapping(""),
                new ServletInfo("foo", PathMappingServlet.class)
                        .addMapping("foo.html"));

    }
View Full Code Here

TOP

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

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.