aa.jsp~31~
上传用户:toby828
上传日期:2015-06-26
资源大小:8558k
文件大小:1k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
  2. <%@ page import="com.dao.BookCaseDAO" %>
  3. <%@ page import="com.actionForm.BookCaseForm" %>
  4. <%@ page import="java.util.*"%>
  5. <%@ page import="com.core.ChStr" %>
  6. <html>
  7. <%
  8. Collection coll=(Collection)request.getAttribute("bookcase");
  9. %>
  10. <body>
  11. <%
  12. if(coll==null || coll.isEmpty()){
  13.   out.println("暂无数据");
  14. }else{
  15.   //通过迭代方式显示数据
  16.   Iterator it=coll.iterator();
  17.   while(it.hasNext()){
  18.     ChStr chStr=new ChStr();
  19.     BookCaseForm bookCaseForm=(BookCaseForm)it.next();
  20.     out.println(bookCaseForm.getId());
  21.     out.println("&nbsp;|&nbsp;");
  22.     out.println(chStr.toChinese(bookCaseForm.getName()));
  23.     out.println("&nbsp;<a href='bookCaseQueryModify.do?ID="+bookCaseForm.getId()+"'>修改</a>");
  24.     out.println("&nbsp;<a href='bookcase_del.do?ID="+bookCaseForm.getId()+"'>删除</a>");
  25.     out.println("<br>");
  26.   }
  27. }
  28. %>
  29. <a href="bookcase_add.jsp">添加书架信息</a>
  30. </body>
  31. </html>