form 提交 无法显示该网页 数据量大提交Post too large错误
来源:互联网 发布:数据平台架构师 编辑:程序博客网 时间:2024/06/05 15:23
如果form表单提交数据量大的时候会出现无法显示该网页。
解决办法1:
在 $TOMCAT_HOME$/conf/server.xml中找到
<Connector port="8080" maxHttpHeaderSize="16384"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
该值默认是4096相当于4K大小的数据。可以适量修改此值以保证正常提交。
maxHttpHeaderSize
The maximum size of the request and response HTTP header, specified in bytes. If not specified, this attribute is set to 4096 (4 KB).
解决办法2:
可以把form的提交方式改为POST。
如果有hidden,检查hidden数据量,问题可能出在hidden标签那, hidden能够传递的数据量好像是100K来着,
还有更正一点,post表单对应的http报文的body部分,没有大小限制,get对应的是http报文的head部,get方式传参所以才有限制。
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-==-=-=-=-=-=-=-=
我是参考下面文章找到的解决办法:原地址:http://www.qqread.com/skill/s495708.html
今天做一个大数据量的提交,结果出现一个错误,说Post too large...
另还有句提示,就是 Parameters were not parsed because the size of the posted data was too big. Use the maxPostSize attribute of the connector to resolve this if the application should accept large POSTs.
这个错误不知道是不是国内的人很少遇到,没几个人写出来。后来我在国外的网站上找到了原因和解决办法:
Q: In Tomcat, I got a "Post data too big" error.
A: Apache Tomcat by default sets a limit on the maximum size of HTTP POST requests it accepts.
In Tomcat 5, this limit is set to 2097152 (2 Mb). When you try to upload files or post forms that are
larger than 2 MB, this error can occur.
The solution is to reconfigure Tomcat to accept larger POST requests, either by increasing
the limit, or by disabling it. This can be done by editing Tomcat's server.xml.
In the <connector>element, add an attribute "maxPostSize" and set a larger value (in bytes) to
increase the limit. Setting it to 0 will disable the size check.
意思是说,tomcat 默认设置能接收 HTTP POST 请求的大小最大为 2M,如果你的POST请求传递的数据大于2M,就会报这个错误。
解决的办法是修改 tomcat 的配置文件 $TOMCAT_HOME$/conf/server.xml,找到里面的标签,在该标签中添加 "maxPostSize" 属性,将该属性值设置成你想要的最大值,单位是字节,如果你把这个值设置为 0(maxPostSize="0"),tomcat 将不再检查 POST 的大小。
- form 提交 无法显示该网页 数据量大提交Post too large错误
- form表单 post提交 数据量大的问题
- Jetty提交数据时报java.lang.IllegalStateException: Form too large问题解决
- Spring boot + maven + jetty9在提交表单的时候出现Form too large
- 向后台提交大数据量
- Form域中用Post提交容量大的数据
- Form域中用Post提交容量大的数据
- Form域中用Post提交容量大的数据
- svn提交时出现(413 Request Entity Too Large)错误解决方法
- SVN-提交时出现(413 Request Entity Too Large)错误解决方法
- Ext2 form 提交错误
- jquery ajax post 提交form
- JQuery模拟form POST提交
- EASYUI FORM表单提交post
- POST请求数据,出现Post too large...错误
- asp.net form post 提交 asp.net js form 提交
- Form表单无法提交问题
- 网页内容不显示 按钮无法触发提交事件
- 深入理解Java内存模型(二)——重排序
- 第二周 项目六 结构体与枚举
- 时序图
- X86系统下 VC环境整二维码识别
- I2C总线
- form 提交 无法显示该网页 数据量大提交Post too large错误
- 深入理解Java内存模型(三)——顺序一致性
- 基于OSI七层过滤数据包的NetFilter防火墙设置
- ADSL
- 单链表
- 【程序13】打印出所有的“水仙花数”
- RTI1.3时间管理支持的两种模式
- 软件示例中常用foo函数,foo变量来表示,这是为何?
- [career] 3D图形向量基础