Jetty 表单提交内容过多

使用 Jetty 作为服务器的时候,表单提交时候,有时会出现这样的错误。

  1. java.lang.IllegalStateException: Form too large395336>200000  
  2.     at org.eclipse.jetty.server.Request.extractParameters(Request.java:249)  
  3.     at org.eclipse.jetty.server.Request.getParameter(Request.java:648)  

  表示 提交的内容过多,可以这样解决, 将 

<?xml version="1.0"?>  

  <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"  

  "http://jetty.mortbay.org/configure.dtd">  

<Configure class="org.eclipse.jetty.webapp.WebAppContext">

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

  <!-- Max Form Size                                                   -->

  <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

扫描二维码关注公众号,回复: 470240 查看本文章

  <Set name="maxFormContentSize">2000000</Set>

</Configure>

的内容编辑成 jetty-web.xml 文件,放在  web-inf 目录下就可以了。

猜你喜欢

转载自guanxi.iteye.com/blog/2249338
今日推荐