后台action中
//获取所有日志列表
public ActionForward getAlldailyList(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws IOException {


response.setContentType("text/xml; charset=utf-8");
List<Daily> alldailylist = dailyManager.getDailies(new Daily());
if(alldailylist!=null&&alldailylist.size()>0){
StringBuffer sb=new StringBuffer("");
String s="";
sb.append("{results:[");
for(Daily d:alldailylist){
s+=",{id:"+d.getDailyid()+",title:'"+d.getTitle()+",content:'"+d.getContent()+"',poster:'"+d.getPoster()+"',posttime:'"+d.getPosttime()+"'}";
}
if(s.startsWith(",")){
sb.append(s.substring(1)+"]}");
}
response.getWriter().print(sb.toString());
System.out.println(sb.toString());
}
return null;
}
前台用Ext
Ext.onReady(function(){
Ext.QuickTips.init();
// 表格配置开始
var sm = new Ext.grid.CheckboxSelectionModel();
var cm = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),sm,

    header:'编号',
    dataIndex:'id',
    width: 50
}, {
    header:'标题',
    dataIndex:'title'
   // width: 20
}, {
header:'内容',
dataIndex:'content'
//width:50
},{
header:'报送人',
dataIndex:'poster'
//width: 20
}, {
header:'时间',
dataIndex:'posttime',
//width: 10,
type:'date',
render: Ext.util.Format.dateRenderer('Y年m月d日')
}]);

store = new Ext.data.Store({
reader : new Ext.data.JsonReader({
totalProperty : "totalProperty",
root : "getAlldailyList",
fields : [{
name:'id'
},{
name:'title'
},{
name:'content'
},{
name:'poster'
},{
name:'posttime'
}]
}),
proxy:new Ext.data.HttpProxy({
url:'daily.do?method=getAlldailyList'
})

})

    
    store.load();    var grid = new Ext.grid.GridPanel({
        autoHeight: true,
        renderTo: 'grid',
        store: store,
        cm: cm,
        sm: sm
    });
    
});
页面提示:
XML解析错误:未组织好 
位置:http://localhost:8080/daily/daily.do?method=getAlldailyList 
行:1,列:1:{results:[{id:73,title:'111111111111,content:'1111111111111',poster:'admin',posttime:'111'},{id:76,title:'23424,content:'234234234',poster:'admin',posttime:'234234'},{id:77,title:'1312,content:'3123123',poster:'lcm',posttime:'312312'},{id:48,title:'日志,content:'日志1111',poster:'admin',posttime:'null'},{id:70,title:'bbbbbbbbbbbbb,content:'bbbbb',poster:'lcm',posttime:'bbb'},{id:78,title:'132,content:'123123',poster:'lcm',posttime:'123'}]}
^到底是哪里错了啊,请大家帮帮忙