我想在我的列表中显示从 JSP 页面检索到的数据。我不知道该怎么做。这是我的 JSP 页面。也请更正 JSP 页面。
**category_List.jsp**
%@page import="java.sql.*, java.util.*" %>
<%
response.setContentType("application/json");
String result = "{\"root\"[{\"category_name\": \"Model number\"}]}";
response.getWriter().print(result);
response.getWriter().flush();
%>
和我的煎茶代码
Ext.define('Sample.view.Blog',{
extend:'Ext.navigation.View',
xtype:'bloglist',
config:{
title:'Blog',
iconCls:'star',
scrollable:true,
styleHtmlContent: true,
items:{
xtype: 'list',
itemTpl: '{category_name}',
store:{
autoLoad: true,
fields: ['category_name'],
proxy:{
type: 'jsonp',
url: 'http://192.168.0.8:8080/new/category_list.jsp',
reader:{
type: 'json',
rootProperty: 'root'
}
}
}
}
}
});
我无法在列表中显示类别名称。谁能帮帮我吗。谢谢