在Java web开发过程中,处理表单数据是很重要一部分,常见的是form post处理单条数据的,但也会遇到一次提交多条数据到服务器的,如下:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAsMAAAG7CAIAAACpdw8kAAAgAElEQVR4nO3dP0/rWMLA4fud/E1Gt1jxLUaabqV8hGmm2+r2b0W7HX0kTJqt4isihY5ikCxxgmTeIhdw/C/2IcRz4HmKFTlxHBPu5Pw4dthvJQBArG9zHwAAkDAlAQDEUxIAQDwlAQDEUxIAQDwlAQDEUxIAQLyxJZFlWZZlc208aYfRD0lU/TvNehx94HtGiObFBD6BE5RE3+w1MJ+1J7+BZzk6U0Yc8yfz+p0e/ZZH/iD6th8YbG8w8sf0xY35NzzyPyuAWZysJCY9fGACG7559Cm+2jtv58s1/P1mWfb7779P2nmWZf/3f/838HoOP+nne9mjTf0nOvrmf/+dZVn27/++3rcfOBgC+BC9JTH1La/smjA6p5D64PAc83rvpKnoq81kA69n3+v/+++/j/mx1l//15Loe+qBI/ncr/8kU1+K4R9o7eZhSfzvP//K6rcBPtBQSfz222/1m6eaRYbnsMZk1reTYV9wGsv6lw2GH9W3QXsnJ/w38GUNvGIR29du1kvi13JEIyNe6qJ+137s5dZ//51l2b/+87/3fIPAF3Sakmh83fj99eh0NXyIjZlsYLIc2KCx5SfTeIkmPeroS3T09W9s1r75iV/5qdovxfALNfqf9GtJ/AqGRka8nOt4sy+GekoICSDOqJLIuha3h2edvg36Nh7eZviJ6oP7KwA6D+Ozzmftb7ZnsikbI+0XZHhk+AWs7/y3334bPpIva/gf89GfSP/NXyXxn9eFh3pK7HvhLRJq/fD25eH6BMBox0uiby7pfFPrfB/smz+OTjZZz+n59rO/Dr5eAdAY79tP6iK+qca8Nfz6d/6I29s3vq6vZr3nUD+f4de585/u0Z9IWZa1RYd//ed/rbMb7RWJX1uWvwLiX//5334jIQFMd6QkBt7aOmeRvl117idinWPMYPtygfqvyH0H+Wkc/TZHzluN13D/qrb/t7F9qSQGDbz4nYPZCGVZv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AmYQQrq+vt9vt4+Pj3McCMM3j4+Pd3d319XX7HUxJwPmEENbrdZ7nS4CkrFaroig6fxFSEgBAPCUBAMRTEgBAPCUBAMRTEgBAPCUBAMRTEgBAPCUBAMT7tgYAiPX/Xy3fA8Kg++AAAAAASURBVDWvBh4AAAAASUVORK5CYII=" alt="" />

jsp页面一般是采用循环插入input输入框的,并且所有的 id 与 name 是前缀相同的,方便服务端获取

 <c:forEach items="${objlist}" var="obj">
<input id="key_${obj.Id}" name="key_${obj.Id}"/>
</c:forEach>

服务器端获取参数代码:

 @RequestMapping(value = "/xxxSave", method = RequestMethod.POST)
public String payPropsSave(final HttpServletRequest request){ final Enumeration<String> enums = request.getParameterNames(); //获取request所有参数 final List<Obj> objList = new ArrayList<Obj>(); while (enums.hasMoreElements()) {
final String paramName = enums.nextElement().toString();
if (paramName.startsWith("key_")) { //过滤以key_开头的所有参数
final String elementValue = request.getParameter(paramName);
final Obj obj = new Obj();
obj.setId(elementValue);
.
.
.
objList.add(props);
}
} objService.saveObjList(objList);
...
...
... return "xxx"; }

以上是工作中积累,如有不妥,请讨论指正,转载注明地址

Java 处理批量数据提交的更多相关文章

  1. 关于SQLServer2000中触发器的使用——多行数据提交

    关于触发器的使用,有很多争议.触发器的好处不言而喻是增强了数据的校验能力,能够有效地实现复杂的业务逻辑.在一定程度上走的比约束和check走的更远.关于触发器的坏处,最典型的就是触发器的使用会导致系统 ...

  2. Java实现Excel数据批量导入数据库

    Java实现Excel数据批量导入数据库 概述: 这个小工具类是工作中的一个小插曲哦,因为提数的时候需要跨数据库导数... 有的是需要从oracle导入mysql ,有的是从mysql导入oracle ...

  3. Java实现大批量数据导入导出(100W以上) -(一)导入

    最近业务方有一个需求,需要一次导入超过100万数据到系统数据库.可能大家首先会想,这么大的数据,干嘛通过程序去实现导入,为什么不直接通过SQL导入到数据库. 大数据量报表导出请参考:Java实现大批量 ...

  4. C#利用SqlDataAdapte对DataTable进行批量数据操作

    C#利用SqlDataAdapte对DataTable进行批量数据操作,可以让我们大大简化操作数据的代码量,我们几乎不需要循环和不关心用户到底是新增还是修改,更不用编写新增和修改以及删除的SQL语句, ...

  5. ligerui_实际项目_003:form中添加数据,表格(grid)里面显示,最后将表格(grid)里的数据提交到servlet

    实现效果: "Form"中填写数据,向本页"Grid"中添加数据,转换成Json数据提交,计算总和,Grid文本框可编辑,排序 图片效果: 总结: //disp ...

  6. jsp多模块相同数据提交到后台之数据处理

    最近在写一个java多模块表单提交,起初想的只是一个简单的form表单提交,写的时候发现不是真简单.多个相同类型数据提交到后台接收的问题很困难. 于是,和人进行深入的讨论,感觉j以json的格式提交时 ...

  7. jdbc工具类的封装,以及表单验证数据提交后台

    在之前已经写过了jdbc的工具类,不过最近学习了新的方法,所以在这里重新写一遍,为后面的javaEE做铺垫: 首先我们要了解javaEE项目中,文件构成,新建一个javaEE项目,在项目中,有一个we ...

  8. 工作随笔—Elasticsearch大量数据提交优化

    问题:当有大量数据提交到Elasticsearch时,怎么优化处理效率? 回答: 批量提交 当有大量数据提交的时候,建议采用批量提交. 比如在做 ELK 过程中 ,Logstash indexer 提 ...

  9. Java中的数据验证

    原文链接:https://www.cuba-platform.com/blog/2018-10-09/945 翻译:CUBA China CUBA-Platform 官网 : https://www. ...

随机推荐

  1. java基础之【堆、栈、方法区】结构图

    |--数组实例化过程 watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaHViaWFvXzA2MTg=/font/5a6L5L2T/fontsize/400/ ...

  2. ASP.NET中指定自定义HTTP响应标头

    新建一个类HideServerHeaderHelper,继承 IHttpModule,然后重写 OnPreSendRequestHeaders,Dispose,Init方法,如下代码所示 using ...

  3. 解决PL/SQL Developer过期

    1 2 3 4 5 6 分步阅读 PL/SQL Developer过期了,又没有注册码,又不想花钱买,而且事情又非常急,这时候怎么办?不要着急,请随小编一起解决这种情况吧. 工具/原料   PL/SQ ...

  4. transport connector和network connector

    1 什么是transport connector 用于配置activemq服务器端和客户端之间的通信方式. 2 什么是network connector 用于配置activemq服务器之间的通信方式, ...

  5. 【python】-- 类的反射

    反射 反射我们以后会经常用到,这个东西实现了动态的装配,通过字符串来反射类中的属性和方法 一.反射函数 1.hasarttr(obj,name_str) 作用:判断一个对象obj中是否有对应的name ...

  6. Java并发之ArrayBlockingQueue

    ArrayBlockingQueue是一个由数组支持的有界阻塞队列.此队列按 FIFO(先进先出)原则对元素进行排序.队列的头部是在队列中存在时间最长的元素.队列的尾部是在队列中存在时间最短的元素.新 ...

  7. linux 4 -awk

    十一.  awk编程:     1.  变量:     在awk中变量无须定义即可使用,变量在赋值时即已经完成了定义.变量的类型可以是数字.字符串.根据使用的不同,未初始化变量的值为0或空白字符串&q ...

  8. linux 基础2-null,cut,wc,head,tail

    一. 特殊文件: /dev/null和/dev/tty Linux系统提供了两个对Shell编程非常有用的特殊文件,/dev/null和/dev/tty.其中/dev/null将会丢掉所有写入它的数据 ...

  9. mysql复制表结构和内容

    许多时候我们想复制一张表部分或者全部内容,或者只复制一张表的框架,这种需求应该说我们很常见. 其实想要实现这种需求十分简单. 表一: mysql> select * from student_i ...

  10. 【整理学习Hadoop】Hadoop学习基础之一:服务器集群技术

            服务器集群就是指将很多服务器集中起来一起进行同一种服务,在客户端看来就像是只有一个服务器.集群可以利用多个计算机进行并行计算从而获得很高的计算速度,也可以用多个计算机做备份,从而使得任 ...