GetCategoryChilds2.jsp
上传用户:sxychgz
上传日期:2019-04-21
资源大小:4772k
文件大小:1k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page language="java" import="com.bjsxt.shopping.category.*, java.util.*" %>
  2. <%
  3. int id = Integer.parseInt(request.getParameter("id"));
  4. List<Category> childs = CategoryService.getInstance().getChilds(id) ;
  5. System.out.println(childs.size());
  6. StringBuffer buf = new StringBuffer();
  7. for(int i=0; i<childs.size(); i++) {
  8. Category c = childs.get(i);
  9. buf.append("addNode(" + id + "," + c.getId() + ",'" + c.getName() + "','images/top.gif');" + "n");
  10. }
  11. response.setContentType("text/html;charset=gbk");
  12. response.setHeader("Cache-Control", "no-store"); //HTTP1.1
  13. response.setHeader("Pragma", "no-cache"); //HTTP1.0
  14. response.setDateHeader("Expires", 0); //prevents catching at proxy server
  15. response.getWriter().write(buf.toString());
  16. %>