<%@page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@page import="org.springframework.context.ApplicationContext"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="ccp.suddenattack.service.news.*"%>
<%@page import="com.netstar8.util.page.*"%>
<%@page import="net.sf.json.*"%>
<%
ApplicationContext context=WebApplicationContextUtils.getWebApplicationContext(application);
NewsService newsService = (NewsService)context.getBean("newsService");
PaginationSupport ps = newsService.findAllNews(10,0);
//out.println(ps.getTotalCount());
JSONObject jsonObject = JSONObject.fromObject(ps);
String jsonStr = "json503="+jsonObject.toString();
out.println(jsonStr);
%>
jsp json 输出
最新推荐文章于 2023-12-07 14:32:25 发布