title: Limit upload size in embedded Jetty
body: <p>I'm trying to limit the maximum upload file size Jetty will accept. I've seen multiple reports that the following should work...</p>
  
  <p>contextHandler.setMaxFormContentSize(xxx);</p>
  
  <p>I notice that this does work for example on our login form, if I set it too a low value the submit is rejected. But for reasonable values (e.g. 5000) it doesn't fail large uploads (e.g. 9MB), perhaps because the upload is set to multi-part.</p>
  
  <p>I could go with implementing our own upload servlet but would preffer to stick with the Jetty implementation. Any ideas on how to successfully limit upload size? I'd preffer an answer in code not a configuration file, we may need to change this based on remote user settings on startup.</p>
  
  <p>Thanks.</p>