If you implement a file upload in your web frontend and want to send the data to the WildFly with HTTP POST, the WildFly will put a stop to it as soon as a certain file size is exceeded. The default value for the size of a POST request is 10MB.

wildfly

So how to configure WildFly upload file limit ? In order to do that, change the max-post-size attribute in the undertow subsystem:

/subsystem=undertow/server=default-server/http-listener=default/:write-attribute(name=max-post-size,value=25485760)  

That will result in the following configuration:

 <subsystem xmlns="urn:jboss:domain:undertow:3.0">  
            <buffer-cache name="default"/>  
            <server name="default-server">  
                <http-listener name="default" max-post-size="25485760" redirect-socket="https" socket-binding="http"/>  <!-- NOTICE max-post-size="25485760"  -->  
                <host name="default-host" alias="localhost">  
                    <location name="/" handler="welcome-content"/>  
                    <filter-ref name="server-header"/>  
                    <filter-ref name="x-powered-by-header"/>  
                </host>  
            </server>  

You can also disable the max post size limit by setting the max-post-size parameter to 0. Run the following CLI command:

 /subsystem=web/connector=http:write-attribute(name=max-post-size, value=0)
0
0
0
s2sdefault

Related articles available on mastertheboss.com

How do I reload dynamically my jsp from an ear ?

  Deploy your Jsp as part of an application deployed in exploded

Where is my compiled JSP ?

JBoss recipe of the day

How do you configure WildFly / JBoss to enable HTTP logging ?

WildFly users WildFly uses Undertow as Web server, which has dep

JBoss Struts tutorial

This article explains how you can setup quickly an application ba

How to restrict access to JBoss web application by IP or Host?

You can create easily Access control list based on the IP address

How do you configure a Web Application as Default Web app ?

WildFly users For WildFly users you have to include in jboss-web