My issue is as follows:
I deliver a webapp.war and a Tomcat server to deploy it from.
My client has the option to not use my server and use a service that deploys my app in Jetty as an external webapp.
That Jetty has a limitiation for POST size that is default (200k) and is too small for my app to run all its features properly - my HTTP 1/1 POST request get truncated and become mainly unusable.
What I need to do is configure my webapp so that when deployed in Jetty as an external app, its max POST size is a value of my choosing - like 1M.
I have done some research and I found that one can configure jetty to change POST size only for a particular webapp, but as I don't use Jetty I am yet unclear where this settings should go and what is the difference, from the settings point of view, between an external webapp and an internal webapp in Jetty (other than path).
http://wiki.eclipse.org/Jetty_WTP_Plugin/Jetty_WTP_External_WebApp
I would have liked to have found out more, but my research was not quite fortuitous with respect to external webapps in Jetty.
I have tried the JVM approach, setting "org.eclipse.jetty.server.Request.maxFormContentSize" environment variable to 1000000, but I noticed no change in my setup behaviour.
The request is not truncated in Tomcat (which also runs on a default configuration), but was so far truncated on Jetty no matter what I did to stop that from happening.
I should not change the Jetty server's global setting, if I can avoid it, but any progress would be welcome even if I have to compromise on this.
Do you guys have any ideas on what I should do?
You could
1) start Jetty with the org.eclipse.jetty.server.Request.maxFormContentSize system property set to your desired value.
(this will set all count for All Apps in the JVM)
2) Changing the Maximum Form Size for a Single Webapp
You can do this either in a context XML deployment descriptor external to the webapp, or in a jetty-web.xml file in the webapp's WEB-INF directory.
In either case the syntax of the XML file is the same:
3) Changing the Maximum Form Size for All Apps on a Server
Set an attribute on the Server instance for which you want to modify the maximum form content size:
source: jetty wiki
If you are programing your own java jetty server, this is the way, how to change body size directly from java source code