Package io.undertow.server.handlers.form

Examples of io.undertow.server.handlers.form.FormEncodedDataDefinition


    public MCMPHandler(MCMPConfig config, ModCluster modCluster, HttpHandler next) {
        this.config = config;
        this.next = next;
        this.modCluster = modCluster;
        this.container = modCluster.getContainer();
        this.parserFactory = FormParserFactory.builder(false).addParser(new FormEncodedDataDefinition().setForceCreation(true)).build();
    }
View Full Code Here


    public MCMPHandler(MCMPConfig config, ModCluster modCluster, HttpHandler next) {
        this.config = config;
        this.next = next;
        this.modCluster = modCluster;
        this.container = modCluster.getContainer();
        this.parserFactory = FormParserFactory.builder(false).addParser(new FormEncodedDataDefinition().setForceCreation(true)).build();
    }
View Full Code Here

            if(config.getMaxFileSize() > 0) {
                multiPartParserDefinition.setMaxIndividualFileSize(config.getMaxFileSize());
            }

            formParserFactory = FormParserFactory.builder(false)
                    .addParser(new FormEncodedDataDefinition())
                    .addParser(multiPartParserDefinition)
                    .build();

        } else {
            //no multipart config we don't allow multipart requests
            formParserFactory = FormParserFactory.builder(false).addParser(new FormEncodedDataDefinition()).build();
            maxRequestSize = -1;
        }
    }
View Full Code Here

        if (SingleThreadModel.class.isAssignableFrom(servletInfo.getServletClass())) {
            instanceStrategy = new SingleThreadModelPoolStrategy(servletInfo.getInstanceFactory(), servletInfo, servletContext);
        } else {
            instanceStrategy = new DefaultInstanceStrategy(servletInfo.getInstanceFactory(), servletInfo, servletContext);
        }
        FormEncodedDataDefinition formDataParser = new FormEncodedDataDefinition()
                .setDefaultEncoding(servletContext.getDeployment().getDeploymentInfo().getDefaultEncoding());
        if (servletInfo.getMultipartConfig() != null) {
            //todo: fileSizeThreshold
            MultipartConfigElement config = servletInfo.getMultipartConfig();
            if (config.getMaxRequestSize() != -1) {
View Full Code Here

            List<AuthenticationMechanism> authenticationMechanisms = new LinkedList<AuthenticationMechanism>();
            authenticationMechanisms.add(new CachedAuthenticatedSessionMechanism()); //TODO: does this really need to be hard coded?

            //we don't allow multipart requests, and always use the default encoding
            FormParserFactory parser = FormParserFactory.builder(false)
                    .addParser(new FormEncodedDataDefinition().setDefaultEncoding(deploymentInfo.getDefaultEncoding()))
                    .build();

            List<AuthMethodConfig> authMethods = Collections.<AuthMethodConfig>emptyList();
            if(loginConfig != null) {
                authMethods = loginConfig.getAuthMethods();
View Full Code Here

        String mechName = null;
        if (loginConfig != null || deploymentInfo.getJaspiAuthenticationMechanism() != null) {

            //we don't allow multipart requests, and always use the default encoding
            FormParserFactory parser = FormParserFactory.builder(false)
                    .addParser(new FormEncodedDataDefinition().setDefaultEncoding(deploymentInfo.getDefaultEncoding()))
                    .build();

            List<AuthMethodConfig> authMethods = Collections.<AuthMethodConfig>emptyList();
            if(loginConfig != null) {
                authMethods = loginConfig.getAuthMethods();
View Full Code Here

        }
        setupMultipart(servletContext);
    }

    public void setupMultipart(ServletContextImpl servletContext) {
        FormEncodedDataDefinition formDataParser = new FormEncodedDataDefinition()
                .setDefaultEncoding(servletContext.getDeployment().getDeploymentInfo().getDefaultEncoding());
        if (servletInfo.getMultipartConfig() != null) {
            //todo: fileSizeThreshold
            MultipartConfigElement config = servletInfo.getMultipartConfig();
            if (config.getMaxRequestSize() != -1) {
View Full Code Here

            List<AuthenticationMechanism> authenticationMechanisms = new LinkedList<AuthenticationMechanism>();
            authenticationMechanisms.add(new CachedAuthenticatedSessionMechanism()); //TODO: does this really need to be hard coded?

            //we don't allow multipart requests, and always use the default encoding
            FormParserFactory parser = FormParserFactory.builder(false)
                    .addParser(new FormEncodedDataDefinition().setDefaultEncoding(deploymentInfo.getDefaultEncoding()))
                    .build();

            List<AuthMethodConfig> authMethods = Collections.<AuthMethodConfig>emptyList();
            if(loginConfig != null) {
                authMethods = loginConfig.getAuthMethods();
View Full Code Here

        String mechName = null;
        if (loginConfig != null || deploymentInfo.getJaspiAuthenticationMechanism() != null) {

            //we don't allow multipart requests, and always use the default encoding
            FormParserFactory parser = FormParserFactory.builder(false)
                    .addParser(new FormEncodedDataDefinition().setDefaultEncoding(deploymentInfo.getDefaultEncoding()))
                    .build();

            List<AuthMethodConfig> authMethods = Collections.<AuthMethodConfig>emptyList();
            if(loginConfig != null) {
                authMethods = loginConfig.getAuthMethods();
View Full Code Here

        if (SingleThreadModel.class.isAssignableFrom(servletInfo.getServletClass())) {
            instanceStrategy = new SingleThreadModelPoolStrategy(servletInfo.getInstanceFactory(), servletInfo, servletContext);
        } else {
            instanceStrategy = new DefaultInstanceStrategy(servletInfo.getInstanceFactory(), servletInfo, servletContext);
        }
        FormEncodedDataDefinition formDataParser = new FormEncodedDataDefinition()
                .setDefaultEncoding(servletContext.getDeployment().getDeploymentInfo().getDefaultEncoding());
        if (servletInfo.getMultipartConfig() != null) {
            //todo: fileSizeThreshold
            MultipartConfigElement config = servletInfo.getMultipartConfig();
            if (config.getMaxRequestSize() != -1) {
View Full Code Here

TOP

Related Classes of io.undertow.server.handlers.form.FormEncodedDataDefinition

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.