SSH,JSON。为什么我把那部分注释掉,页面就有返回,取消注释,页面就什么都没有..
或者能不能告诉我有什么办法能将后台数据传到前台的js中,list<user>类型/*privateStatisticsServiceImplstatisticsServi...
或者能不能告诉我有什么办法能将后台数据传到前台的js中,list<user>类型
/*private StatisticsServiceImpl statisticsServiceImpl;
public StatisticsServiceImpl getStatisticsServiceImpl() {
return statisticsServiceImpl;
}
public void setStatisticsServiceImpl(
StatisticsServiceImpl statisticsServiceImpl) {
this.statisticsServiceImpl = statisticsServiceImpl;
}*/
private List<Tbdetail> detailList;
public List<Tbdetail> getDetailList() {
return detailList;
}
public void setDetailList(List<Tbdetail> detailList) {
this.detailList = detailList;
}
public String countByProvince(){
detailList = statisticsServiceImpl.countByProvince();
for (Tbdetail tbdetail : detailList) {
System.out.println(tbdetail.toString());
}
return "list";
}
<package name="json" extends="json-default" namespace="/">
<action name="jsonss" class="statisticsAction" method="countByProvince">
<result name="list" type="json"></result>
</action>
</package> 展开
/*private StatisticsServiceImpl statisticsServiceImpl;
public StatisticsServiceImpl getStatisticsServiceImpl() {
return statisticsServiceImpl;
}
public void setStatisticsServiceImpl(
StatisticsServiceImpl statisticsServiceImpl) {
this.statisticsServiceImpl = statisticsServiceImpl;
}*/
private List<Tbdetail> detailList;
public List<Tbdetail> getDetailList() {
return detailList;
}
public void setDetailList(List<Tbdetail> detailList) {
this.detailList = detailList;
}
public String countByProvince(){
detailList = statisticsServiceImpl.countByProvince();
for (Tbdetail tbdetail : detailList) {
System.out.println(tbdetail.toString());
}
return "list";
}
<package name="json" extends="json-default" namespace="/">
<action name="jsonss" class="statisticsAction" method="countByProvince">
<result name="list" type="json"></result>
</action>
</package> 展开
1个回答
2013-05-01
展开全部
前后台是通过http 协议交互的,最好能先熟悉http原理
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询