Jetty Logo
Version: 9.2.7-SNAPSHOT
Contact the core Jetty developers at www.webtide.com

private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery

Setting Max Form Size

For a Single Webapp
For All Apps on a Server
For All Apps in the JVM

Jetty limits the amount of data that can post back from a browser or other client to the server. This helps protect the server against denial of service attacks by malicious clients sending huge amounts of data. The default maximum size Jetty permits is 200000 bytes. You can change this default for a particular webapp, for all webapps on a particular Server instance, or all webapps within the same JVM.

For a Single Webapp

The method to invoke is: ContextHandler.setMaxFormContentSize(int maxSize);

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:

For All Apps on a Server

Set an attribute on the Server instance for which you want to modify the maximum form content size:

For All Apps in the JVM

Use the system property org.eclipse.jetty.server.Request.maxFormContentSize. This can be set on the commandline or in the start.ini file.

See an error or something missing? Contribute to this documentation at Github!(Generated: 2014-12-21T01:00:24-08:00)