Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Howto/Configure Form Size"

< Jetty‎ | Howto
(New page: {{Jetty Howto | introduction = Modifying the maximum permissable size of submitted form content. ==Form Content Size== == Changing for a single webapp == Context files are normally l...)
 
Line 1: Line 1:
 
{{Jetty Howto
 
{{Jetty Howto
| introduction = Modifying the maximum permissable size of submitted form content.
+
|introduction = Modifying the maximum permissable size of submitted form content.
 
+
==Form Content Size==
+
  
 +
== 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.
  
  
Line 23: Line 23:
 
   <Set name="maxFormContentSize">200000</Set>
 
   <Set name="maxFormContentSize">200000</Set>
 
</Configure>
 
</Configure>
 +
</source>
  
 
== Changing for all apps on a Server ==
 
== Changing for all apps on a Server ==
Line 39: Line 40:
 
   <set name="maxFormContentSize"></set>
 
   <set name="maxFormContentSize"></set>
 
</configure>
 
</configure>
 +
</source>
  
 
| category = [[category:Jetty Howto]]
 
| category = [[category:Jetty Howto]]
 
}}
 
}}

Revision as of 00:42, 15 August 2011



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>

Back to the top