title: Wildfly 9: Undertow setup by programming [max-post-size] rather than modifying standalone.xml
body: <p>I need to increase the max-post-size of my undertow configuration, because I got the following exception</p>
  
  <pre><code>java.io.IOException: UT000020: Connection terminated as request was larger than 10485760 
  at io.undertow.conduits.FixedLengthStreamSourceConduit.checkMaxSize(FixedLengthStreamSourceConduit.java:168) 
  </code></pre>
  
  <p>and I need post requests with larger payloads.</p>
  
  <p>However, I know that I could adapt <code>standalone.xml</code>, but I was not able to figure successfully out, how I can do this by programming or at least in web.xml (I need to be able to put the change in the build artifact rather than in the server configuration).</p>
  
  <p><strong>Edit</strong>:<br>
  I use the post requests with jax-rs <code>@Post</code> methods. If it is possible to e.g. annotate a payload size per request, it would also be OK, since there are only few requests needing higher payload size enabled.</p>
  
  <p>Can anybody point my to what I can do?<br>
  Thanks in advance!</p>