<struts>
<include file="struts-default.xml"/>
<!-- 编码 -->
<constant name="struts.i18n.encoding" value="UTF-8"/>
<!-- 配置使用Spring管理Action -->
<constant name="struts.objectFactory" value="spring" />
<package name="json" extends="json-default">
<action name="*_*" class="com.nondelivery.action.{1}Action" method="{2}">
<result type="json"/>
</action>
</package>
</struts>
public class User implements java.io.Serializable {
// Fields
private Integer id;
private String usercode;
private String password;
private String username;
private String department;
private String grade;
private String[] priority;
private String tel;
}
1、这样转自动json就出错, private String[] priority改成 private String priority就正常
2、private String[] priorit又分两种情况:(1)this.data=new ArrayList()含Map<String, Object>就正常 (2)this.data=new ArrayList()含javabean即User就出错。
出错还不报错,firebug没返回json。
大侠们帮帮忙 是不是struts要特定配置?
------解决方案--------------------
没有错误信息吗?/