当前位置:网站首页>form表单 post提交 数据量大的问题
form表单 post提交 数据量大的问题
2022-04-23 07:34:00 【beinlife】
问题:页面1提交之后,如果数据量太大,页面2获取不到,获取到的值为null
解决方法:
POST传递没问题。
在tomcat里面设置server.xml
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
maxPostSize="2000000"/>
//maxPostSize 这个属性0代表无限制
jsp页面1
<form name = "transferform" method = "post" action = "excel_create.jsp">
<input name="tabletitle" type="hidden" value="">
<input name="tablevalue" value="">
<script language="JavaScript">
var oldborder;
if(parent.Gridtable){
oldborder=parent.Gridtable.border;
parent.Gridtable.border="1";
}
transferform.tabletitle.value = parent.TABLE_TITLE.innerText;
transferform.tablevalue.value = parent.TABLE_DATA.innerHTML;
transferform.submit();
if(parent.Gridtable){
parent.Gridtable.border=oldborder;
}
</script>
</form>
jsp页面2
response.setCharacterEncoding("utf-8");
String data=(String)request.getParameter("tablevalue");
String title=(String)request.getParameter("tabletitle");
String filename=title+".cls";
response.setHeader("Content-Disposition","attachment;filename=" + new String("default_excel.xls".getBytes("GBK"), "ISO-8859-1"));
版权声明
本文为[beinlife]所创,转载请带上原文链接,感谢
https://blog.csdn.net/beinlife/article/details/53582465
边栏推荐
- The following program deletes n consecutive words starting from the ith character from the string str
- The whole house intelligence bet by the giant is driving the "self revolution" of Hisense, Huawei and Xiaomi
- Distributed service governance Nacos
- Somme numérique de la chaîne de calcul pour un problème simple de leetcode
- Rearranging log files for leetcode simple question
- Data security has become a hidden danger. Let's see how vivo can make "user data" armor again
- 网赚APP资源下载类网站源码
- Using qlst excel file
- 剑指offer day24 数学(中等)
- 校园转转二手市场源码下载
猜你喜欢
一款拥有漂亮外表的Typecho简洁主题_Scarfskin 源码下载
QT compilation qtxlsx Library
PyQt5开发之QTableWidget表头自定义与美化(附源代码下载)
nn.Module类的讲解
Campus transfer second-hand market source code download
A simple theme of Typecho with beautiful appearance_ Scarfskin source code download
跨域配置报错: When allowCredentials is true, allowedOrigins cannot contain the special value “*“
ansible自動化運維詳解(一)ansible的安裝部署、參數使用、清單管理、配置文件參數及用戶級ansible操作環境構建
CGM优化血糖监测管理——移宇科技亮相四川省国际医学交流促进会
LeetCode中等题之旋转函数
随机推荐
获取TrustedInstaller权限
Common regular expressions
2022.4.11-4.17 AI行业周刊(第93期):AI行业的困局
js常用数组方法
dried food! Point based: differentiable Poisson solver
跨域配置报错: When allowCredentials is true, allowedOrigins cannot contain the special value “*“
【Appium】测试时遇到手机内嵌H5页面的切换问题
Comparison of indoor positioning methods of several intelligent robots
The following program deletes n consecutive words starting from the ith character from the string str
Description of the abnormity that the key frame is getting closer and closer in the operation of orb slam
QT reading and writing XML files
Qt利用QtXlsx操作excel文件
How to read books and papers
LeetCode簡單題之計算字符串的數字和
输入/输出系统
Data security has become a hidden danger. Let's see how vivo can make "user data" armor again
C语言学习记录——삼십팔 字符串函数使用和剖析(2)
[learning] audio and video development from scratch (9) -- nuplayer
LeetCode-199-二叉树的右视图
synchronized 实现原理