- 浏览: 1085637 次
- 性别:
- 来自: 上海
文章分类
- 全部博客 (401)
- tomcat (7)
- win7 (13)
- stackOverflow (6)
- 1 (0)
- css (5)
- develop IDE (9)
- hibernate (16)
- struts2标签 (10)
- struts2 (25)
- 框架 (1)
- SQLserver2005 (20)
- 词汇解释 (1)
- views (1)
- eclipse (6)
- 效率提高 (12)
- 代码模块 (1)
- 源代码 (3)
- jsonplugin (5)
- ajax (2)
- json (3)
- ssis (14)
- 电脑故障 (10)
- oracle (12)
- poi;excel (5)
- sql (3)
- 正则表达式 (3)
- develop IDEk (8)
- myeclipse (14)
- win2003 (5)
- 正则表达式;js (2)
- js (27)
- 待解决 (2)
- ognl (1)
- com组件 (1)
- 游戏 (6)
- 线程 (0)
- 硬盘 (4)
- 格式化 (2)
- java (7)
- html (9)
- firebug (1)
- jquery (4)
- 文件上传下载 (1)
- vss (2)
- 触发器 (1)
- spring事务管理 (2)
- 模态对话框 (1)
- SQLserver2000 (1)
- web性能优化 (2)
- web安全 (1)
- jetty (1)
- 路由器 (1)
- ie6 (1)
- 缓存 (1)
- jsp (1)
- struts2源代码 (1)
- 方法 (1)
- uml (1)
- ie (3)
- Java日志框架 (1)
- myeclipse,oracle (1)
- freemarker (4)
- 注解 (4)
- svn (2)
- hadoop (15)
- lucene (1)
- word (1)
- spring (5)
- job (1)
- extjs (4)
- paxos (1)
- zookeeper (1)
- 分布式 (1)
- 手机故障 (2)
- maven (2)
- linux (9)
- 虚拟机 (1)
- ext (3)
- javascript (1)
- 数据库 (5)
- 多线程 (12)
- junit (2)
- utils (1)
- mybatis (4)
- Joda-Time (1)
- tftp (1)
- scala (12)
- Graphic2D (1)
- jsf (5)
- 《java并发编程实战》笔记 (16)
- storm (3)
- 设计模式 (3)
- 泛型 (2)
- 数学 (1)
- primeface (1)
- poi (5)
- 线性代数 (1)
- 动态代理 (3)
- mysql (2)
- DB2 (2)
- testNG (1)
- 虚拟机、编译器、增量发布 (1)
最新评论
-
zhouchaofei2010:
Saro 写道在log4j配置里把mapper所在包设为deb ...
mybatis出现sql异常时的日志优化-打印sql参数 -
Saro:
在log4j配置里把mapper所在包设为debug就行了,参 ...
mybatis出现sql异常时的日志优化-打印sql参数 -
pyl574069214:
...
poi Excel 水平居中 垂直居中 -
zhouchaofei2010:
杀手请杀人 写道能看到scala太难得了 谢谢
scala 下划线解析报错: missing parameter type for expanded function -
杀手请杀人:
能看到scala太难得了
scala 下划线解析报错: missing parameter type for expanded function
jsonplugin 0.32 0.34 官方下载 http://code.google.com/p/jsonplugin/
文档:http://code.google.com/p/jsonplugin/wiki/Documentation
https://cwiki.apache.org/confluence/display/WW/JSON%20Plugin
Excluding properties
<!-- Result fragment --> <result type="json"> <param name="excludeProperties"> login.password, studentList.*\.sin </param> </result> <!-- Interceptor fragment --> <interceptor-ref name="json"> <param name="enableSMD">true</param> <param name="excludeProperties"> login.password, studentList.*\.sin </param> </interceptor-ref>
Including properties
<!-- Result fragment --> <result type="json"> <param name="includeProperties"> ^entries\[\d+\]\.clientNumber, ^entries\[\d+\]\.scheduleNumber, ^entries\[\d+\]\.createUserId </param> </result>
对集合 listAttachment.*, listAttachment\[\d+\] 含义是不同的
listAttachment.*, 指listAttachment集合对象本身
listAttachment\[\d+\] 指listAttachment集合对象中的元素
评论
6 楼
zhouchaofei2010
2013-06-25
qswdit 写道
应该是一个list 对象不做任何处理
list 好处理,但是set 没处理过,也不知道怎么处理。为了性能效率,通常需要对list处理的,只需得到我们想要list集合中元素的的具体属性值。
5 楼
zhouchaofei2010
2013-06-25
qswdit 写道
求解释! 我指向返回一个完全的json 怎么搞!
什么意思,是指简化json么?
4 楼
qswdit
2013-06-25
应该是一个list 对象不做任何处理
3 楼
qswdit
2013-06-25
求解释! 我指向返回一个完全的json 怎么搞!
2 楼
zhouchaofei2010
2012-02-29
难问题啊,没试过。
1 楼
fandia
2012-02-29
如果返回的JSON是个集合,而且集合中包含着集合,怎么配置result中的includeProperties??
如返回的teachers是一个List<Teacher>,包括着studentSet,studentSet是一个Set<Student>
如果只想取得studentSet中的每一个Student对象的姓名(student.name),includeProperties怎么配置?
我试着如下,不行,什么都不会返回,感觉从逻辑上应该没有错误.
teachers\[\d+\]\.studentSet\[\d+\]\.name
如果是这样,会返回所有的Student对象属性
teachers\[\d+\]\.studentSet.*
这不是我需要的
如返回的teachers是一个List<Teacher>,包括着studentSet,studentSet是一个Set<Student>
如果只想取得studentSet中的每一个Student对象的姓名(student.name),includeProperties怎么配置?
我试着如下,不行,什么都不会返回,感觉从逻辑上应该没有错误.
teachers\[\d+\]\.studentSet\[\d+\]\.name
如果是这样,会返回所有的Student对象属性
teachers\[\d+\]\.studentSet.*
这不是我需要的
发表评论
-
struts2 下载不弹出下载对话框
2012-12-19 17:15 2114如下配置可以: <action name=&quo ... -
getResourceAsStream
2012-12-19 17:00 2519getResourceAsStream http:// ... -
struts2访问WEB-INF文件下内容
2012-11-29 17:30 47821、 WEB-INF下内容,通过浏览器下无法直接访问 2、 ... -
struts2标签判断字符串
2012-11-14 13:24 81711:<s:property value='#at ... -
struts2附件上传,大小超过最大值处理
2012-06-20 14:19 3336Action: /** * 当上传文件大小大 ... -
struts2 action resultType ajax
2012-06-06 11:17 983概要: 如何在st ... -
数据操作后,页面alert提示例子
2012-04-19 15:16 990在页面开头插入如下例子代码 <s:if test ... -
struts2 格式化输出日期yyyy-MM-dd
2012-03-26 11:17 17301、直接页面输出 <s:date nam ... -
defaultStack已经包含了fileUpload的拦截器。具体的action不用再另外配置fileUpload的拦截器
2012-03-19 19:42 1024struts2.0.11 的defaultStack已经包含 ... -
struts2 property 不起作用
2012-03-16 11:41 1294<s:select id="select_s ... -
s:hidden value用property标签赋值不起作用
2012-03-07 17:23 4844<s:property value="titl ... -
struts2的重定向带参数
2012-03-06 23:28 0redirect。。。。 -
jsp 调试输出值
2012-03-06 22:46 1187比如有代码 <s:if test="#gdzc ... -
struts2 ognl 传递参数原理及过程
2011-12-31 17:22 1016struts2 ognl 传递参数原理及过程 -
struts2 jsonplugin includeProperties中对list集合的正则配置
2011-12-29 21:21 36041、listAttachment.*\.realName ... -
struts2的重定向与转发配置
2011-12-27 16:18 1198<result name="success&q ... -
囧!json jsonplugin在includeProperties正则 list集合等不能序列化
2011-11-30 04:19 980原因: 工程中用jsonplugin0.32版本的源代码替换 ... -
struts2读取资源文件的方式
2011-11-27 15:24 1257(1)JSP页面:<s:text name=" ... -
Struts2中对数字进行格式化,1、将数字用 , 号分隔 2、将小数格式化为百分比
2011-11-27 14:51 1180Struts2中对数字进行格式化,1、将数字用 , 号分隔 ... -
struts 2数字格式化话
2011-11-27 14:41 1989--jsp页面 <s:textfield maxLen ...
相关推荐
Struts2_Jsonplugin_详解.doc
是struts的一个插件包
为了方便ajax调用传输数据,在struts2中加入的json插件用来做对象的序列化和反序列化,json插件的下载地址 http://code.google.com/p/jsonplugin/ 1. 下载json插件包,将jar包拷贝到WEB-INF/lib目录 注:struts2...
第一次上传,要5分,是物有所值,处理了jsonplugin 的no session的问题,并且添加了,新的注释,例如 ...2.对one-ton-many ,one-to-one ,值设为null(被设置为延迟加载的时候) 3.不需要配置底层实体,在当前action配置就可以
json2+jsonplugin struts2整合ajax时,使用json时需要的jar包。。。。。。。。。。。。
包括struts2的jar包,共33个非常全的,实用的。还有jsonplugin-0.33.jar包
struts2-core-2.xx 升级为struts2-core-2.3.15.1.jar后 jsonplugin-0.32.jar需要升级为 struts2-core-2.3.15.1.jar,不然在使用ajax时候报错 java.lang.NullPointerException at org.apache.jsp.web.error_jsp._jsp...
jsonplugin-0.32(struts2.0.0).jar jsonplugin-0.34(strurs2.1.6).jar
1、json.js 2、jsonplugin-0.34.jar 3、struts2-json-plugin-2.1.8.1.jar
1,需要把jsonplugin-0.33.jar拷贝到Web-INF/lib目录下....2,在struts2.1.6的配置文件中进行配置,就是返回的类型是json,并且要为JSON数据单独创建一个Package,继承的包不再是struts-default,而是json-default
NULL 博文链接:https://shengren-wang.iteye.com/blog/1325210
jsonplugin源码包,struts2 ajax jsonplugin源码,源码学习
jxl.jar;dom4j.jar;jsonplugin-0.34.jar;junit-3.8.2.jar;log4j-1.2.14.jar;struts2-codebehind-plugin-2.0
1、将struts2的json插件加入web工程的lib,jsonplugin的下载地址:http://code.google.com/p/jsonplugin/downloads/list
该压缩包内包含三个jar文件,其功能和jsonplugin.jar文件相同,用于和struts2.1.8整合,转换json数据格式供extjs使用
struts2 + jsonplugin google自动提示 ajax示例
jsonplugin0.33的代码,能够与struts2使用的
jsonplugin-0.32.jar jsonplugin.jar包
java structs jsonplugin