Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Jetty/Howto/Configure Form Size
Contents
Introduction
Modifying the maximum permissable size of submitted form content.
Form Content Size
Jetty limits the amount of data that can be posted 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.
Changing for a single webapp
Context files are normally located in <jetty.home>/contexts/ (see ContextDeployer for more details). Context files can be used to configure the size of the maximum form content:
<Configure class="org.eclipse.jetty.webapp.WebAppContext"> <Set name="contextPath">/</Set> <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/test.war</Set> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <!-- Max Form Size --> <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> <Set name="maxFormContentSize">200000</Set> </Configure>
Changing for all apps on a Server
<!--?xml version="1.0" encoding="ISO-8859-1"?--> <configure class="org.eclipse.jetty.server.Server"> <Call name="setAttribute"> <Arg>org.eclipse.jetty.server.Request.maxFormContentSize</Arg> <Arg>200000</Arg> </Call> <set name="maxFormContentSize"></set> </configure>