"Java. Lang. illegalstateexception: Post too large" is reported when flex exports the DataGrid"

Source: Internet
Author: User
Document directory
  • Apache Tomcat/5.5.27

The error message is as follows:

HTTP status 500-

TypeException report

Message

DescriptionThe server encountered an internal error () that prevented it from fulfilling this request.

Exception

org.apache.jasper.JasperException: Exception in JSP: /Flex/excelexport.jsp:107: String s=df.format(new Date()); 8: request.setCharacterEncoding("UTF-8");9: response.setHeader("Content-disposition","attachment; filename=ExportFile "+s+".xls");10: out.print(request.getParameter("htmltable"));11: %>Stacktrace:org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:367)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

 

Root Cause

java.lang.IllegalStateException: Post too largeorg.apache.catalina.connector.Request.parseParameters(Request.java:2388)org.apache.catalina.connector.Request.getParameter(Request.java:1005)org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353)org.apache.jsp.Flex.excelexport_jsp._jspService(excelexport_jsp.java:52)org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)javax.servlet.http.HttpServlet.service(HttpServlet.java:729)org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

 

NoteThe full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.

Apache Tomcat/5.5.27

 

The cause is: in Tomcat, the configured maxpostsiz is too small. The change method is as follows:

In CONF/server. XML, add maxpostsize = 0

 

<Connector acceptcount = "100" connectiontimeout = "20000" DEBUG = "0" disableuploadtimeout = "true" enablelookups = "false" maxspark hreads = "75" maxthreads = "150" minsparethreads =" 25 "Port =" 8092 "redirectport =" 8443 "maxpostsize =" 0 "/>

 

You can.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.