`

"posted data was too big!":与tomcat maxPostSize 属性有关的异常

阅读更多

这几天看jboss的服务器日志,发现有形如这样的异常信息

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.

联想到客户反映上传大于10000条以上记录的excel文件数据(不是直接上传,而是js读取数据列,生成隐含域提交)的

时候总提示错误,可能就是这个问题,查看server.xml,发现当前connector 没有设置maxPostSize 属性,上网搜索一翻后,

http://www.websina.com/bugzero/faq/exception-tomcat-connector.html

找到如下信息

Request management and problem tracking software
Bugzero one-for-all bug tracking and help desk support system
 
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.






* Reference brought to you by Bugzero, it's more than just bug tracking software!

原来tomcat5默认maxPostSize大小为2m,如果设置为0,则不做post data size的检查.

以下是tomcat官方文档相关内容

http://tomcat.apache.org/tomcat-5.0-doc/config/http.html

maxPostSize

The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The feature can be disbled by setting this attribute to a value inferior or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).

 

 因此修改maxPostSize成0就可以了,如果不希望控制用户上传大小的话.

分享到:
评论

相关推荐

    Veracity of Big Data Machine Learning and Other 2018

    Examine the problem of maintaining the quality of big data and discover novel solutions. You will learn the four V’s of big data, including veracity, and study the problem from various angles. The ...

    tomcat下配置https方式

    tomcat下配置https方式 Tomcat配置HTTPS方式 Posted on 2012-06-08 14:22 Delei 阅读(4398) 评论(4) 编辑 收藏 简要记录主要步骤备忘

    如何解决在jsp页面上导入.xls文件报错问题

    在这个场景中,一个常见的错误是“java.io.IOException: Posted content type isn’t multipart/form-data”。这个问题通常发生在尝试在JSP页面上传.xls文件时,由于请求的Content-Type不正确导致的。下面将详细解释...

    无刷马达调速

    Also some inspiration was taken from the brushless controllers designed by Holger Buss for the Mikrokopter project (http://www.mikrokopter.de). But the design is constantly changing and moving away ...

    code-sharing-platform:带有MVC和REST API的Spring Boot和H2数据库上的代码共享平台

    "date" : "THE DATE IT WAS POSTED" , "time" : 0 , // Time left to view the snippet (0 - unlimited) "views" : 0 // Number of views left for the snippet (0 - unlimited) } GET 获取10个最新的不受限制的...

    IF-EX-ME-REQ-POSTED~POSTED

    采购申请BADI:ME_REQ_POSTED 方法:POSTED

    Object-Orientation, Abstraction, and Data Structures Using Scala, 2nd Edition

    "Object-Orientation, Abstraction, and Data Structures Using Scala, Second Edition" English | ISBN: 149873216X | 2017 | 662 pages | True PDF | 36 MB Mark Lewis’ Introduction to the Art of ...

    python-backoff:作为装饰器的指数退避

    Python 退避装饰器 ... # do something with data that wasn't posted 在上面的示例中,当 POST 不成功时,对send_data()调用send_data()指数退避。 退避期间的呼叫 在退避期间进行的任何调用都会引发I

    DDR2 sdrm datasheet

    附加延迟则是在POSTED CAS操作中的额外延迟,旨在优化数据访问时间。写入延迟等于读取延迟减去一个时钟周期tCK。 MT47H128M4支持可选择的突发长度(4或8),允许用户根据需要选择最适合的内存访问模式。 还有,它...

    Reddit-Scrapper:简单的npm软件包,可帮助您在reddit应用程序中获取一些数据

    Reddit cr击者 :inbox_tray: 安装 npm install reddit-scrapper :magnifying_glass_tilted_right: 关于 Reddit Scrapper是简单的npm软件包,可帮助您... title: 'Sorry if this has been posted here before', image

    BobBuilder_app

    Really big data sets! Index parameter tuning Performance Tests - v2.3 Using the Code Differences to v1 Using RaptorDBString and RaptorDBGuid Global parameters RaptorDB interface Non-clean shutdowns ...

    PM+ABAP开发常用的table清单

    以下是一些与PM+ABAP开发密切相关的表格及其功能: 1. AFIH - Maintenance Order Header:这个表格存储了维护订单的头部信息,包括订单编号、订单状态、创建日期等关键数据。 2. AFKO - Order Header Data PP ...

    pcie处理层协议中文详解.doc

    4. 请求和响应处理机制:处理层协议使用请求和响应机制来处理数据传输,包括非posted请求和posted请求两种类型。 处理层协议的主要特点包括: 1. 高速数据传输:处理层协议支持高速数据传输,最高可达32GT/s。 2. ...

    Nara-Bot:Arduino控制的机器人

    项目日志: : 2640327&posted=1# 重要文件:Readme.md(正在阅读!) -Nara_code.ino:这是机器人本身的Arduino Mega 2560代码。 -Nara_ControlpadNano.ino:这是用于独立xBee控制板的Arduino代码。 -...

    与西门子PLC通讯的Labview库,还不错

    与西门子PLC通讯的Labview库,还不错。 以下是英文声明: Warning, the attached files are experimental VIs provided for educational purposes only. No warrantee is expressed or implied. You should test ...

    Qt中的事件机制

    exit_was_called) { while (!posted_event_queue_is_empty) { process_next_posted_event(); } while (!spontaneous_event_queue_is_empty) { process_next_spontaneous_event(); } while (!posted_event_...

    To_be_posted_3.rar_weighted particle

    压缩包内的文件"_to be posted 3_"可能是主程序文件或者相关数据文件,可能包含了具体的WPSO算法实现、问题定义、输入参数设置以及结果输出等功能。如果要深入理解或复用这个代码,你需要解压文件并查看源代码,理解...

    community-starter-kit:蒙娜丽莎项目

    欢迎机器人:Probot应用将其替换为一些可能对新用户有用的项目符号...//github.com/behaviorbot/new-issue-welcome# Comment to be posted to on first time issuesnewIssueWelcomeComment: &gt; Thanks for opening yo

    Overview of RDMA on Windows-计算机科学

    Overview of RDMA on WindowsWenhao WuProgram ManagerWindows HPC teamAgenda• Microsoft’s Commitments... LSTC LS-DYNA data to be posted athttp://www.topcrunch.org. LS-DYNA version mpp971.R3.2.1.• Similar

Global site tag (gtag.js) - Google Analytics