Jetty/Howto/Configure Form Size

From Eclipsepedia

< Jetty‎ | Howto
Revision as of 00:40, 15 August 2011 by Janb.webtide.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

{{Jetty Howto | introduction = Modifying the maximum permissable size of submitted form content.

Form Content Size

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 ==
 
<source lang="xml">
<!--?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>
 
| category = [[category:Jetty Howto]]
}}