乱码分析

2022-08-17 00:05:51   文档大全网     [ 字体:小 中 大 ] [ 阅读: ]

【#文档大全网# 导语】以下是®文档大全网的小编为您整理的《乱码分析》,欢迎阅读!
乱码,分析

1MyEclipse中裝了Spket插件后,設置默認方式后,

js文件打開錯誤Bad version number in .class file

进入打开cmd(命令提示符)Eclipes目录下,

cd C:\Program Files (x86)\MyEclipse 6.5\eclipse

输入

eclipse.exe -clean

待Eclipse启动后,即可打开编辑jsp页面。

还有一种方法:

删除configuration文件夹里除config.ini以外的所有文件,重启Eclipse

--------------------------------------------------------------------------------------

2

Positioned Update not supported

2011-05-11 13:43:54| 分类: Java-Eclipse | 标签:struts struts2 java |举报|字号 订阅

第一次遇到这个问题还以为是什么大毛病了,报了许多sql错误。原来是Struts2中整合JSON时出的异常。

解决方法是修改*Action.java

删除不必要的get方法:

// public IAutoServiceTagService getAutoServiceTagService() {

// return autoServiceTagService;

// }

为get方法添加不需要JSON序列化的标注:

@JSON(serialize=false)

public IAutoServiceTagService getAutoServiceTagService() {

return autoServiceTagService;

}

<action name="userAdd" class="userAddAction">

<result type="json">

<param name="excludeProperties">userDAO</param>

</result>

</action>

---------------------------------------------------------------------------

Ext.data.DataReader (meta, recordType)

meta:

totalProperty:   json数据中,保存总记录数的属性

successProperty:   json数据中,保存是否返回成功的属性名

root: json数据中,保存记录集的属性的属性名

id: json数据中,记录中主键所对应的列的属性名

var reader = new Ext.data.JsonReader(

{

totalProperty: "results", //totalRecords属性由json.results得到

successProperty: true, //json数据中,保存是否返回成功的属性名

root: "rows", //构造元数据的数组由json.rows得到

id: "id" //id由json.id得到

}, [

{ name: 'name', mapping: 'name' },

{ name: 'occupation'} //如果name与mapping同名,可以省略mapping

]

);

本文来源:https://www.wddqxz.cn/e7f29461cb50ad02de80d4d8d15abe23482f032e.html

相关推荐